Crossfire Server, Trunk  R20513
Internationalisation and localisation

i18n's routines are located in the languages.c file.

To use i18n in the server code, instead of putting strings, use

i18n(who, "This is a translatable message.");

with who the player's object you wish to translate for.

The string can be anything you want, and will get replaced by the localised version. They must not contain a | character. If the string doesn't exist for the language, the code will be returned.

The recommanded strategy for translation is:

Language files are located in lib/i18n/messages.xx files, with xx the language's code, "en" or "fr" for instance.

They are installed as part of make install.

The format is straightforward:

Warning: currently the order of arguments is fixed, as defined by the print call (English version if you followed this guide) in the code.