## FreeCol internationalisation

This package contains the FreeCol support for internationalisation (translation).

The {@link net.sf.freecol.client.gui.i18n.Messages} class provides the API to the translations. Client code might include:

new AbstractAction( Messages.message("cancel") )

..whereupon the Messages class will look for a file called:

FreeColMessages[_la[_CO]].properties

..where `_la` and `_CO` are the language and country codes from the locale. The most specific file will be loaded. With a US locale, `Messages` will look for `FreeColMessages_en_US.properties` first, then `FreeColMessages_en.properties` and finally `FreeColMessages.properties` if neither of the other two are found.

`FreeColMessages.properties` contains a line like this:

cancel=Cancel

..while `FreeColMessages_hu.properties` has a corresponding line:

cancel=Mégse

## MessageMerge

Only `FreeColMessages.properties` is updated as new messages are added so a tool is required for translators to keep their translations up to date when new messages are added.

At the console, type:

ant compile-test
java -cp src/classes net.sf.freecol.client.gui.i18n.MessageMerge src/net/sf/freecol/client/gui/i18n/FreeColMessages.properties src/net/sf/freecol/client/gui/i18n/FreeColMessages_hu.properties

..where the red message file is the one to merge from (typically the one shown above) and the black message file is the one to merge to.

The screen shot shows "players" and "gameState" messages have been added. Select the added messages from the left and press the [insert in right] button. To remove obselete or over-zealously inserted messages, select a range from the right and press the [delete from right] button. Press the [save right] button to write the changes to the message file shown on the right hand side. Doing so will destroy your translation file without warning so ensure that the file on the right-hand side is committed to CVS before pressing the button or you risk losing your work.

$Revision: 1185 $ $Date: 2006-01-05 19:19:51 +1030 (Thu, 05 Jan 2006) $