Translate and Localize Phex
From PhexWiki
This tutorial explains which steps are necessary to translate Phex and test the translation inside Phex.
If you like to get involved, please also stop by at the Phex Localization-Forum
The tutorial will use the term PHEX_HOME to specify the Phex installation directory on your system. On windows this will likely be at c:\Program Files\Phex x.x.x
Contents |
Create the language file
Before you start with translation you need to create the directory: PHEX_HOME\ext
Now download a copy of the Phex language file Lang.properties and save it in the PHEX_HOME\ext directory. The Lang.properties will be used as a template you can use for your translations.
Rename the Lang.properties file in your PHEX_HOME\ext directory to include your ISO language code using this pattern: Lang_[lang]_[COUNTRY].properties
After "Lang" there must be an underline then the first 2 letters or the language are lowercase, then separated by underline then the last 2 letters or the country are uppercase, this must always be respected.
Examples
- Lang_es_ES.properites -> Spanish, Spain
- Lang_es_MX.properites -> Spanish, Mexico
- Lang_fr_FR.properties -> French, France
Now is time to translate your language file with your favorite text editor. On Windows you can use Notepad.
Configure Phex
Create a new file called language.list and add a single line representing your language and country code in the form [lang]_[COUNTRY] e.g. pt_BR, es_ES, nl_NL You'll have to create this file to make your translation be recognized by Phex.
To edit this file on Windows you can use a editor like Notepad.
After the file is edited, save and close it.
Test the translation
That's all, if you did everything accordingly using the EXACT initials of your language your translation must be in the language section of the Options Dialog of Phex.
Share your experience
If you have any questions regarding the translation of Phex or like to share your experience please stop by at the Phex Localization-Forum
Further Information
When Phex looks for a translation of a term it will always follow the following steps and uses the first term found:
- First it will check if the term is available in a language + country definition, e.g: es_MX -> Lang_es_MX.properties
- If not found it will look for for a definition for the language, e.g: es -> Lang_es.properties
- If the term was still not found it will fallback to the default english language file, Lang.properties
Available languages
Phex is available in:
- English (en_EN)
- Dutch (nl_NL)
- German (de_DE, de_DE_WW, de_DE_GG)
- French (fr_FR)
- Turkish
- Spanish (es_ES, es_MX)
- Portuguese (pt_BR)
This guide is updated with the help of Felipe experience while translation Phex to pt_BR


