My organisation is about to embark on the long process of internationalizing (i16g?) its corporate website. The website is a mix of Java EE (JSP/Servlets, no EJB) and static content pushed from the (Documentum) WCM.
While I have experience using the "built-in" mechanism of using ResourceBundle
's along with the associated properties files for each language/locale (containing the "KEY=Translated value" approach), where we simply reference the KEY value where we want the translated text to appear.
My director has mentioned that he has used a different approach at a previous organisation whereby they used a 3rd-party library (he does not recall the actual name) which included the actual [english] text in the webpage (to aid developers) which was replaced at run time with the translated content from the config xml file. (anyone know which library this would be?)
I am interested in what other approaches/libraries/frameworks there might be out there to facilitate this.
Thanks
Internationalization (sometimes shortened to "I18N , meaning "I - eighteen letters -N") is the process of planning and implementing products and services so that they can easily be adapted to specific local languages and cultures, a process called localization .
Internationalization (i18n) is the process of making your application capable of rendering its text in multiple languages. Localization (l10n) means your application has been coded in such a way that it meets language, cultural, or other requirements of a particular locale.
Locale has three constructors: new Locale(String language) new Locale(String language, String country) new Locale(String language, String country, String variant)
Your boss probably meant gettext, just like @Pawel Dyda mentioned, but cosmopolitan may also be of interest to you.
My company also maintains a GNU gettext-related library for Java (and very soon with extensions aimed at Scala).
Not only does it support all of the goodness of GNU gettext, it also simplifies output AND input of date/timestamps and currency, include facilities for using "wiki" formatting in translations (so you can output HTML bold on a word, for example), java message formatting, generalized "escape" support (so the output can be auto-escaped for inclusion, say, in HTML), and currency rounding.
It is open-source, and currently on github at https://github.com/awkay/easy-i18n/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With