Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Before reading this, make sure you know about standard java i18n, because we won't recap. In case you don't, >>> tutorial to i18n <<<
In the webwork based implementation, we obviously use ww's i18n system. Of course we had to trick it a bit: usually, translation chains are retrieved based on the current action's class. Instead of that, we wanted to use the Application classes as base location... Ok, what does this all mean? Well, all in all, it's very easy: if you want i18n, just provide properties files named like your Application implementations are. Alright, a sample?
// here use the snippet macro to include FirstSampleApp
then all you'll need is to define the translations accordingly: you should have a directory structure similar to this:
net/incongru/swafberkano/sample/FirstSampleApp.properties
net/incongru/swafberkano/sample/FirstSampleApp_fr.properties
net/incongru/swafberkano/sample/FirstSampleApp_fr_BE.properties
net/incongru/swafberkano/sample/FirstSampleApp_zn.properties

...

(warning) This will currently only work if you use swafberkano-seraph, or if you provide your own implementation of UserPropertyHelper.