| .. | ||
| en.txt | ||
| es.txt | ||
| README.md | ||
| template.txt | ||
Translating Stendhal
NOTE: localization is still a work-in-progress
Locale File Format
The file format is simple. It is a plain text file with each line representing either a translatable string or a comment (a line beginning with "#"). Comments and empty lines are ignored by the translation interface. Each line for a translatable string is made up three parts:
- The original string (usually in English).
- A "=" separator.
- The locale's translation of the original string.
Example of translating the item name "dress" to Spanish:
dress=vestido
New Translations
-
Make sure the desired locale file does not already exist.
-
Copy the template (
data/languages/template.txt) to a new file with the desired locale code.Example for Spanish:
data/languages/template.txt->data/languages/es.txt -
Open the new locale file in a text editor.
-
Add the locale's equivalent translations to each string following the "=" separator.
NOTE: if a string should not be translated, simply delete the line
Updating Translations
- Open the appropriate translation file in a text editor (example:
data/languages/es.txt). - Find the string to be translated and update locale translation following the "=" separator.
- If the string does not exist in the file simply add it followed by a "=" separator and the locale translation.