I have a combobox where users can select an available language. The application contains properties files for each language.
In the resources section of the page the resource bundle is calculates according to a language tag ( DE, EN … ) in a user config document.
Is there any easy way to change the language in the onChange event according to the value of the combobox? I thought of context.setProperty(???).
Any suggestion?
To implement this application wide you could use a phase listener. In this example, the locale to use is stored in a sessionScope variable named “Language”.
Just add a combobox to your XPage(s) containing all allowed locales.
Then you have to use a phase listener like this one:
You can add lookups / etc. to access the user profiles in the “getLanguag()” method.
Hope this helps
Sven