While waiting on the next plane I write this little posting about a simple technique used in the very nice !!Help!! application available on OpenNTF which give a basic support for different languages support across an application.
Actually I was looking at a more advanced solution using Yahoos Translator utily, but time made me decide to the most easy/quickest approach making the most benefit of Domino functions itself.
While my main focus is development for the web the technique can still be easily used across forms. Here is how it works:
- In Notes documents you define the values for each language you want to suppport, mostly these values are grouped by the design element you use them in or the specific type of element they present (field labels, action buttons… things like that)
- On the design element itself you make a connection to the preferred language selected by the user, in my example it is a normal document that is being treated like a ‘profile document’:
- Add lookup fields for each ‘language’ document you have created:
- On the place in the design element where you want to show/use the related value you strip the results and return the result:
That’s it! But… wait. This does not work for buttons on a form because Domino allows not a computed value/label for it.
JSON to the rescue!
The most easiest way to get the values in an array I thought was transforming them in a JSON format wia basic @Functions:
With this array I easily approach all my <input> type buttons via Prototype and replace their values with the value defined in the array:
A downloadable working example can be found here. I wonder which language support systems you are using?
Very nice Patrick. Thanks for sharing.