Return to DK Summary

Localisation


Where is it

BeHappy's localisation system is very simple. The localisation information is contained in the BeHappy.loc file for the BeHappy application, and in the different *.loc files for the add-ons. If you want to add a localisation system to your add-on, you'll have to create a localisation file. The file name must be the same than the add-on, with a .loc at the end.


.loc syntax

First a line beginning with a '#' will be ignored. You can use this to put somme commentaries. Then come the languages list. The add-on's "native" language should come first, and be between a '[' and a ']'. Each language should be put on a different line. As an example:

[English]
Français
Deutch

Then you can put the translations. First put the string to translate, bewteen a '[' and a ']', and then put the translated strings. Each string should be put on a different line. The languages used must be in the same order than the one used previously. As an example:

[Spawn new window]
Créer une nouvelle fenêtre
Neues Fenster öffnen


What to translate

You can translate any string you want, except the index names. These are automaticly translated by BeHappy, if they are found in the .loc file.

Next: Sample Add-on

Return to DK Summary