In some cases you would like to get a list of languages which user is able to select on his/her Android phone. For example I have the following languages on my device: You would expect this from Locale.getAvailableLocales(). But it returns the full list of locales supported by Android platform:[bg, bg_BG, ca, ca_ES, cs, cs_CZ, da, da_DK, de, de_AT, de_BE, de_CH, de_DE, de_LI, de_LU, el, el_GR, en, en_AU, en_BE, en_BW, en_BZ, en_CA, en_GB, en_HK, en_IE, en_IN, en_JM, en_MH, en_MT, en_NA,…

If you’ll search for the term “Localization in GWT” – you’ll find numerous articles about using META tag with gwt:property name, like <meta name=”gwt:property” content=”locale=de”>But sometimes it’s not very convenient. For example we have an iframe with reference to some another GWT module and this module bypasses META tag written for the parent document. In this case cookie is the easiest choice. So in the combo selecting the language you specify a cookie with any name you like, for example…

To extend the contents of Magnolia CMS – we have created several custom paragraphs. Once we need a localization for these paragraphs – we’ve tried a usual approach used in STK. So we’ve written something like${i18n[‘custom.goToTop’]}in the FreeMarker template and got the following error immediately:freemarker.core.InvalidReferenceException: Expression i18n is undefined on … What the hell, our template is similar to the STK paragraphs? Later it appeared that we’re missing one important property in the paragraph metadata called i18nBasename. Exactly this parameter…

Localization support in Java is rather good. But what about the convenience of providing localized resource bundles? I usually use NetBeans for the development and editing resource files. But what if you would like to provide this localization files for your customer? So we’ve decided to do some investigations on this topic. The primary criteria according to which the tools were estimated are the following: Simplicity of use Support of simultaneous display of multiple language data (required) Detecting keys with…

In simple Java application you have a standard approach to read the localized string:Locale currentLocale = new Locale(“fr”, “CA”, “UNIX”)ResourceBundle labels = ResourceBundle.getBundle(“ButtonLabel”, currentLocale);You can easily get the localized stringString buttonLabel = ButtonLabel.getString(“buttons.OK”);The bad thing here is that you manipulate with string and such a string can probably do not exist in the properties file and you’ll be able to see it only after running application. You can’t detect this problem in the compile time. The good thing here is…