[Yanel-dev] i18n catalogues

Josias Thöny josias.thoeny at wyona.com
Thu Aug 9 16:55:24 CEST 2007


Hi all,

To allow multiple i18n message catalogues, I made a small improvement of 
the I18nTransformer2, see:

http://bugzilla.wyona.com/cgi-bin/bugzilla/show_bug.cgi?id=5456

With this patch, you can define multiple i18n catalogues in the rc of a 
resource:

  <yanel:property name="i18n-catalogue" value="foo"/>
  <yanel:property name="i18n-catalogue" value="bar"/>
  <yanel:property name="i18n-catalogue" value="global"/>

The I18nTransformer2 will look for a key first in the "foo" catalogue, 
and if the key is not found it will look in the "bar" catalogue and so on.

Currently we're using simple property files as message catalogues.
I think this is bad and we should use xml files instead.

One major disadvantage of text property files is that the encoding is 
unknown, which is bad especially in the case of i18n files because 
foreign languages may want to use a special encoding.

Actually java 6 supports xml files as resource bundles, but i guess we 
cannot require java 6.
So we have to find a different solution. Maybe commons-configuration? It 
  supports plain-text properties as well as xml properties, so maybe we 
could make it backwards-compatible.

WDYT?

josias



More information about the Yanel-development mailing list