====== Translations ======
**Note:** Replace ''xx'' and ''xx_XX'' with your locale country code (e.g. ''de'' and ''de_DE'').
===== Resource files =====
The localisation resources for the HoldingNuts client are simple XML-files. They can either be edited by hand/text-editor (not recommended) or with the Qt development tool ''Linguist''.
==== Linguist ====
* [[http://www.qt-apps.org/content/show.php/Qt+Linguist+Download?content=89360|Download Linguist]] for your appropriate OS
* [[http://doc.trolltech.com/latest/linguist-manual.html|Linguist manual]]
On a debian-based system you can run
sudo apt-get install qt4-dev-tools
===== How to create a new resource file? =====
Best is to [[http://www.holdingnuts.net/contact|contact a HoldingNuts developer]] and ask him to send the latest translation template.
Another way is to generate a template yourself. Checkout and setup the sources for updating translations (described in [[:devel:setup]]). Means, configuring your environment with
cmake -DUPDATE_TRANSLATIONS=On ../trunk
Create a file ''trunk/src/client/translations/hn_xx.ts''
Run make to generate the translation file
make translations
===== How to update an existing resource file? =====
Same as in above section but without the "create file" step.
Alternatively run ''lupdate'' manually.
===== How to test a new translation? =====
- Generate the binary translation file (*.qm)
* either by using Linguist File -> Release as.... Save to file to ''data/i18n/hn_xx.qm''
* or by running ''make translations'' when you've checked out the sources. Copy the file from ''build/src/client/hn_xx.qm'' to ''data/i18n/hn_xx.qm''
* or by runnning ''lrelease'' manually: ''lrelease hn_de.ts''
- Edit your client [[:handbook|configuration]] file with a text-editor. Set the config variable ''locale'' to "''locale xx''".
- Start the client. It should now use your new/updated translation.