[Yanel-dev] [FYI] i18n and GWT (and also other Javascript frameworks/libraries)

Guillaume Déflache guillaume.deflache at wyona.com
Thu Jan 14 17:47:09 CET 2010


For the moment in Yanel we do not support i18n inside GWT modules 
specifically (e.g using Yanel realms' standard translation support).

Basically GWT supports i18n in two ways:
- thru Javascript i18n-key/i18-value maps as a catch-all integration 
solution
   - this requires us to implement a XML to JSON (well, some subset of 
it) conversion for i18n catalogs
   - this technique can also be useful for any JS-based library/framework
   - note that using this technique prohibits detecting some i18n errors 
at compile-time and removing unused keys
- either internally at compile-time using almost-standard Java 
properties files
   - this implies having two kinds of files to translate: these 
GWT-specific ones and the classic XML files for the rest of Yanel

In both cases we would have to modularize i18n catalogues a lot: down to 
a catalogue per module for GWT!


My random notes so far:

http://code.google.com/webtoolkit/doc/latest/DevGuideI18n.html
- [cf. i18nCreator script for how to use UTF-8 Java properties files]
- 
http://code.google.com/intl/de-DE/webtoolkit/doc/latest/DevGuideI18nLocale.html
 > <module>
 >   <inherits name="com.google.gwt.user.User"/>
 >   <inherits name="com.google.gwt.i18n.I18N"/>
 >     <!-- French language, independent of country -->
 >   <extend-property name="locale" values="fr"/>
 >
 >   <!-- French in France -->
 >   <extend-property name="locale" values="fr_FR"/>
 >
 >   <!-- French in Canada -->
 >   <extend-property name="locale" values="fr_CA"/>
 >     <!-- English language, independent of country -->
 >   <extend-property name="locale" values="en"/>
 > </module>
 > > <meta name="gwt:property" content="locale=ja_JP">
- [lowest level: JS key/value maps :(] 
http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/i18n/client/Dictionary.html

HTH,
    Guillaume


More information about the Yanel-development mailing list