11 Internationalization (i18n)
The internationalization (i18n) support of Kauri includes:
- determination of the active locale settings
- a reusable form snippet to let users configure their locale preferences
- translation based on resource bundles
- formatting of numbers and dates (including timezone adjustment)
- template language integration of the above two features
- server side and client side (browser) support
- customization of resource bundles by developer-users or deployer-users
11.1 i18n first steps
11.1.1 wiring.xml
If you generated your project from a template, then this might already be set up for you.
In the wiring.xml, add the following modules as first modules.
<modules>
<artifact id="i18n" groupId="org.kauriproject" artifactId="kauri-i18n-impl">
<mount name="i18n" path="/kauri/i18n"/>
</artifact>
<artifact id="locale-assignment" groupId="org.kauriproject" artifactId="kauri-locale-assignment"/>
The kauri-i18n-impl module provides all i18n functionality, most notably resource bundle loading.
The locale-assignment module installs a Restlet filter which will determine the locale to use. This is a small module, which you could replace with your own if you want to use custom logic for this.
Previous