Translators Guide
From Unknown Horizons
It's now possible to translate Unknown Horizons into any language with latin characters. This guide shows how to create your own translation. We recommend to use Poedit to edit the files. This is a simple program for all common platforms.
Contents |
Finished translations
- <flag> Start date (Current version)
2009-04-11 (2009-04-11)
2009-04-11 (2009-04-11)
2009-04-15 (2009-04-15)
2009-05-04 (2009-05-04)
2009-05-07 (2009-05-07)
Requirements
- working development source code installation of Unknown Horizons
- simple texteditor
Create templates
Templates are the first building block for gettext. They are basically a list of strings that could be translated. To create the most up-to-date templates run the following in unknown-horizons's trunk directory:
pygettext -d unknownhorizons -p po .
Alternatively you could use the version from trunk http://unknown-horizons.org/trac/export/HEAD/trunk/po/unknownhorizons.pot which should be reasonably up-to-date
Start a new translation
Starting an translation for an language currently not available for Unknown Horizons is done by copying po/unknownhorizons.pot to po/$LANG.po and running again ./setup.py build
Updating existing translations
After strings changing in Unknown Horizons, translations may get outdated. If you have an template newer that the translation you are interested in, you can update the translation File with
msgmerge -U po/$LANG.po po/unknownhorizons.pot
Working on translations
After creating or updating the .po file you'll want to work on the translations. The .po files in the po directory are textfiles in the special gettext format. You can either use your favourite Text editor to edit them or use dedicated software like poedit.
Finishing off
To load the translations into Unknown Horizons it is necessary to convert them into the binary format. this can be done using the msgfmt command:
msgfmt po/$LANG.po -o build/mo/$LANG/LC_MESSAGES/unknownhorizons.mo
When this has finished start Unknown Horizons and check wether the new Translations are available!
Make them official
After verifying your translations are good, please submit them so we can include them for the public. This is done best using our Trac: Add a new Ticket with Component set to Translations and add you .po Files as Attachment.

