-
Notifications
You must be signed in to change notification settings - Fork 6
Internationalization
The Explorer can be translated into different languages. To achieved that, 2 new files are required to be translated.
- ApplicationResources_LANG.properties
- urlResource_LANG.properties *
LANG represents the ISO 639-1 code for the new language.
* : inverted properties file. e.g. value_in_another_language=english_key.
For full example take a look at the French URL resource.
If you are using your own web-theme, you also need to provide the resources for your theme.
The Explorer is using full i18n URLs meaning that, for example, the search page URL is /en/search
for English and /fr/rechercher
for French.
Internally, all requests are converted to /search?lang=fr
or /search?lang=en
.
e.g. “/fr/rechercher” -> “/search?lang=fr”
This technique deals with the part of the URL path that contains the language and i18n resource name. The application URL mapping can then ignore the language and translation.
- Query parameters
- Paths that start with
/assets/
(static resources likes JavaScript, CSS and image files) - Paths that start with
/ws/
(web service end-point)
The library used to map the received path to a resource path is OCPSoft Rewrite.