#summary This is a guide for new translators.
= Translations =
== Introduction ==
This is a guide for translators. In order to translate Hedgewars into another language you are going to need:
# The latest Hedgewars localization files
# A text editor like Notepad++, Geany, Vim, etc.
# Qt Linguist (not strictly required but strongly recommended). To download Qt Linguist, you have to download the Qt SDK.
== Getting the localization files ==
To get the Hedgewars localization files there are 4 possible ways.
* *A*. Clone the Hedgewars source repository.
* *B*. Download the latest Hedgewars source code.
* *C*. Find the localization files in your current Hedgewars installation.
* *D*. Download only the specific files to be translated.
The *A* is maybe the most convenient way to include the translations in the next Hedgewars release as you can easily produce a patch to provide it to the Hedgewars developers. Note that a fast internet connection is desired as you probably will clone the whole game sources. The other advantage of this way is that it can be used to translate the latest game version that is going to be released.
The *B* way is a lot like the *A* way but more limited.
The *C* is probably the fastest way and the more convenient for the translator.
However, it has the limitation that one can only translate the most recent Hedgewars release (the one currently installed) and not the version that is going to be released.
The *D* way is to download the desired files from [https://hg.hedgewars.org/hedgewars/file/default/share/hedgewars/Data/Locale/ here].
Above I am going to discuss the *C* way (Find the localization files in your current Hedgewars installation).
=== Finding the localization files ===
In GNU/Linux you have to look into `/path-to-Hedgewars/Data/Locale where path-to-Hedgewars` is the path to your Hedgewars installation.
In Windows you have to look into `c:\path-to-Hedgewars\share\Hedgewars\Data\Locale` where path-to-Hedgewars is the path to your Hedgewars installation.
For example, in an Arch Linux box the path is `/usr/share/hedgewars/Data/Locale`.
For Windows 8, the path is `C:\Program Files (x86)\Hedgewars \Data\Locale`.
== Language codes ==
Languages are identified with the [https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes ISO 639-1 language code] (e.g. “de” for German). For regional language variants, an [https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 ISO 3166-1 alpha-2 country code] can be appended with an underscore (e.g. “pt_BR” for Brazilian Portuguese).
== Translation files ==
Here is a list of the different localization files of the English language that you should use as your translation reference/template as it should be the most accurate and up to date. The file locations are relative to the top directory of the Hedgewars source code. You can edit all these files with a text editor, but for some files special editors are available.
=== Overview ===
These are all files which contain translatable text for Hedgewars. Replace “ZZ” with the actual language code.
* `/share/hedgewars/Data/Locale/ZZ.txt`—In-game strings
* `/share/hedgewars/Data/Locale/ZZ.lua`—Scripted stuff (missions and game styles)
* `/share/hedgewars/Data/Locale/hedgewars_ZZ.ts`—Frontend
* `/share/hedgewars/Data/Locale/missions_ZZ.txt`—Mission names and descriptions
* `/share/hedgewars/Data/Locale/campaigns_ZZ.txt`—Campaign names and descriptions
* `/share/hedgewars/Data/Locale/tips_ZZ.xml`—Main menu tips
* `/share/hedgewars/Data/Maps/