The following comment has been added to this issue:
Author: Siveton Vincent
Created: Sat, 13 Nov 2004 9:46 AM
Body:
I am totally agree with you. The internationalization support is an highly
issue for some reasons like law constraint (Canada has two official languages -
English and French)
This issue was already discussed in the past with the release manager of XDOC
plugin. He suggested me to share here my proposal (as an alpha version) and to
explain quickly my implementation.
Here is a generated structure (in totally agreement with the release manager)
for an english/french web site:
|-- en\
|-- user_dir\
|-- index.html
|-- ... (mail-lists.html, maven-reports.html...)
|-- fr\
|-- user_dir\
|-- index.html
|-- ... (mail-lists.html, maven-reports.html...)
|-- images\
|-- style\
|-- user_dir\
|-- index.html
|-- ... (mail-lists.html, maven-reports.html...)
Thus, we have a default version, an english version and a french one. You can
easily switch language from the left navigation bar (see screenshot)
My implementation choice is:
* Bundle properties to generate documents from Xdoc templates (allow
translation for the actual XDOC plugin):
maven-xdoc-plugin-1.9-SNAPSHOT\plugin-resources\templates\templates.properties
* User can define his own bundle. By default, the bundle is in the
${maven.docs.src} xdoc folder and its name is ${maven.xdoc.bundle}:
${maven.docs.src}\${maven.xdoc.bundle}.properties
LIMITATION: actually, the plugin should copy this bundle to
maven-xdoc-plugin-1.9-SNAPSHOT\plugin-resources\temp\ directory to provide keys
access.
* Added message tag to translate easily message. Example:
<message key="mykey"/> ==> it s a shortcut to the user bundle (more quickly to
write!)
<message key="mykey" bundle="myBundle"/> ==> Key in the defined bundle from the
XDOC path ie bundle="plugin-resources\temp\myBundle")
About key and text, I choose this rule: define a key is more important that the
text message itself.
For instance, <title key="myKey">blabla</title> will become the myKey value and
NOT blabla text.
* Update some already defined tags to allow key and bundle management
To try my proposal, unzip attachments:
* maven-xdoc-plugin-1_9-SNAPSHOT.zip to unzip into ${user.home}\.maven\cache\
* a dummy example based on genapp plugin. Just call in a command line "maven
site" or "maven app:default"
To create your own internationalize web site, just add this keys in your
project.properties:
maven.xdoc.locale.list=en, fr
maven.xdoc.bundle=xdocs
and add xdocs.properties and xdocs_(fr | en).properties files in your xdocs
folder
And, write or update your Xdocs to allow keys and bundle;o)
Known problem:
If you are using a big site or a multiproject site, its highly recommanded to
increase the memory to prevent outofmemory failure
MAVEN_OPTS=-Xms512m -Xmx1024m
Future direction:
I think that every project should have a default language and available
languages. The language should become a part of the POM definition. Thus, all
plugins should provide internationalization ways.
Feel free to contact me to other questions or if you have some problems with
this updated plugin.
Best regards,
Vincent
---------------------------------------------------------------------
View this comment:
http://jira.codehaus.org/browse/MPXDOC-128?page=comments#action_26378
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/browse/MPXDOC-128
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MPXDOC-128
Summary: Internationalized Websites
Type: Improvement
Status: Open
Priority: Major
Original Estimate: 16 hours
Time Spent: Unknown
Remaining: 16 hours
Project: maven-xdoc-plugin
Versions:
1.9
Assignee: Arnaud HERITIER
Reporter: Daniel Frey
Created: Fri, 12 Nov 2004 5:26 AM
Updated: Sat, 13 Nov 2004 9:46 AM
Environment: All
Description:
Documentation generated by maven xdocs plugin does not support
internationalization. The main scope therefore is restricted to developers.
However, end user documentation is as well a very suitable scope for mavens web
site. I therefore would appreciate an internationalizable xdocs plugin. I
consider this an important feature, as it opens maven to new people.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]