XDoc plugin uses Java to produce internationalised documentation. Please refer to:
|-- en\ |-- user_dir\ |-- index.html |-- ... (mail-lists.html, maven-reports.html...) |-- fr\ |-- user_dir\ |-- index.html |-- ... (mail-lists.html, maven-reports.html...) |-- OTHER_LANGUAGE\ |-- user_dir\ |-- index.html |-- ... (mail-lists.html, maven-reports.html...) |-- images\ |-- style\ |-- user_dir\ |-- index.html |-- ... (mail-lists.html, maven-reports.html...)
You should define a default locale and all supported locales.
For example, you want to produce Maven documentation by
default in English, and also in French and in German. Just add
these properties in your project.properties
file:
maven.xdoc.locale.default=en maven.xdoc.locale.supported=fr, de
You should define your own bundles called
${maven.xdoc.bundle}.properties
in the
${maven.xdoc.bundle.src}
directory. In our example, you should have:
|-- ${maven.xdoc.bundle.src}\ |-- user_dir\ |-- ${maven.xdoc.bundle}.properties |-- ${maven.xdoc.bundle}_fr.properties |-- ${maven.xdoc.bundle}_de.properties
You should create your own XDoc files which supports i18n. For
navigation.xml
:
<menu key="mykey"/> <item key="mykey" href="/mylink.html" />
myxdoc.xml
:
<title key="mykey"/> <message key="mykey"/> <section key="mykey"/> <subsection key="mykey"/> <a hrefkey="myhrefkey">My i18n link</a>
<title key="myKey">blabla</title>