Table of Contents
The Cedega Graphical User Interface (GUI) supports localization . If you would like to provide a translation to your favourite language, we would appreciate it! If your translation is accepted, you will have your name credited within the Cedega GUI and on our translations website, as well as the appreciation of other Cedega users who share your mother tongue.
The main homepage for the Cedega Volunteer Translations initiative is available at: http://www.cedega.com/i18n/. From there you can see which languages already have translations, who translated them, and which versions they are available for.
Ensure you have the gettext suite of applications installed on your Linux machine. You will require msginit, msgfmt, and msgmerge, at the very least. If these aren't installed on your machine, you will need to install whatever package gettext's tools are contained in on your particular Linux distribution.
Find the “p2p_localized_msg.pot” file in your installation folder. This is by default in the /usr/lib/transgaming_cedega folder. Copy this file to your “.cedega/.languages” directory.
Make the following directory structure inside your “.languages” directory:
.languages/<LANG_ID>/LC_MESSAGES
Where <LANG_ID> is the id of the language you want to translate to. For example, if creating a French Canadian translation you would use fr_CA, and create the following directories:
.languages/fr_CA/LC_MESSAGES
Initialize the message catalog by running the following command:
LANG=<LANG_ID> msginit
So in the example, you would enter:
LANG=fr_CA msginit
Go to http://www.cedega.com/i18n/, and check if a translation already exists for this locale. You can see from the table on that page which languages have been translated, as well as which version of the Cedega GUI was targeted, and the revision of the translation. If an older translation is available, download the PO file for your locale to a local directory on your machine and save it as “old_<LANG_ID>.po”. You can merge the strings that are already translated into the blank template provided with Cedega, leaving just the new strings that were added in subsequent versions of Cedega to be translated. To do this you need to process the file with msgmerge:
msgmerge -o <LANG_ID>.po old_<LANG_ID>.po p2p_localized_msg.pot
Where:
<LANG_ID>.po is the output file containing the previously translated strings and any strings that still need translating
old_<LANG_ID>.po is the existing translation for your language that you downloaded from http://www.cedega.com/i18n.
p2p_localized_msg.pot is the translation template that comes packaged with Cedega
If there was no previously available translation, you need to create a new PO file from the PO template file as follows:
msgmerge -U <LANG_ID>.po p2p_localized_msg.pot
Edit the PO file created in the previous step in your editor of choice. Your editor must support saving in UTF8 format. Enter the translated equivalent below each English phrase listed. For example, you will see a collection of lines like:
#: joystick_config_gui.py:94
msgid "Configure Joysticks"
msgstr ""
The msgid is the English phrase from Cedega that needs translating. The msgstr portion is where you would plug in the equivalent of the phrase in your language. If you want to leave it untranslated (maybe its not translatable) you can either remove the msgid/msgstr pair from the .po file, or comment it out:
#: joystick_config_gui.py:94
#msgid "Configure Joysticks"
#msgstr ""
Any string that is not translated will be displayed in its default English form.
There are also a number of tools which can help with the editing of your translation. For instance PoEdit (http://poedit.sourceforge.net/) and Ftplugin for VIM (http://vim.sourceforge.net/scripts/script.php?script_id=695) are just a couple.
Save your translation file. Be sure to use UTF8 format - otherwise the gettext tool you will use, msgfmt, will give you errors.
Compile the translation into binary format:
msgfmt <LANG_ID>.po -o <LANG_ID>/LC_MESSAGES/p2p_localized_msg.mo
Set up the following environment variables, and then start Cedega as normal. You should now have the Cedega GUI in your native language.
export LANG=<LANG_ID>
export LC_MESSAGES=<LANG_ID>
Note: Your language will not show up in the Languages tab by using the above testing procedure, however the Cedega GUI will load your language resource and make use of it if it is placed in the directory structure described above.
Please submit your gzipped translation files (gzip <LANG_ID>.po) or any questions to the Cedega development mailing list: winex-devel@lists.cedega.com. Be sure to include the name you wish to be credited with in Cedega and the correct language ID for your translation.
Please subscribe to the mailing list at: http://lists.cedega.com/cgi-bin/mailman/listinfo/winex-devel.
Please note that by providing a translation for the Cedega GUI you are assigning the copyrights to that translation to TransGaming Technologies and are expressly giving us the rights to redistribute your translation.