This morning I read a blog from Patrick Kwinten about a internationalisation a pager control in XPages. As stated in the comments I am not fan of the way it done in XPages and do it my own way.
But let’s take the Pagers control as an example.
Own property file
In the files section of the database I have properties files for every supported language in the application. In this property file I have 2 lines for the pager control.
I have a Language Bean who controls the internationalisation. First is the correct language property defined, default by the configuration document, but then it can be specified by the user.
The most important part of the language bean is the the method ‘getLanguageString(key)’ where key who is used in the property file.
As always I use themes in all my apps. It is an easy way to load and control parts of the application.
In my theme I set the value of the Previous and Next label of the Pager Control, throughout of my application
In the beginning it can be more work to get everything setup, but when you are used to it is more flexible than the build in internationalisation of XPages.
For example, when a label value should be changed, you don’t have to access lots of design elements. Just go to the property file, change it. Build the application and there you go.
And it will apply also for all the labels through the whole applicationby