You don't need to be a developer to help take Xara Xtreme forward. You can create translated versions of Xara Xtreme by following the instructions below. And there's no need to build or even download the Xara Xtreme source to produce a translation. Just download the latest version of the program and use that to try out your translations.

Xara Xtreme uses the gettext mechanisms for externalising text that needs to be localised. The following translation procedures have been tested so far only on Linux (Fedora Core) but since gettext is available on Mac and Windows the procedure should be similar on those platforms.


The contributors agreement that applies to all contributions from Xara Xtreme developers also applies to contributions from localizers/translators if the translation is to be included in the official Xara Xtreme distribution. Please see the contributor agreement page for details. At least initially, translators and developers won't have write access to the svn repository, so please send contributions to the commits mail list.

Language IDs

Language Ids have the format ll_CC, where ll is the language code and CC is the country code (for example en_US, en_GB, fr_FR). See for a list of language and country codes. Language codes are used to name the po files that hold the messages.

Translation/Localization Process

The following example shows how to create a US English translation using language code en_US. The same process applies to other languages using the relevent language id.

1. Make sure your happy with the terms of the contributor agreement.

2. Download the latest XaraLX.po file from here (this file is automatically generated from the latest Xara Xtreme source every few hours). Save the file as en_US.po. Alternatively, if you've already built Xara Xtreme from the source code, run the following command on the XaraLX.pot file that is in the po directory of the source (the pot file is created during a Xara Xtreme build).

msginit -i XaraLX.pot -o en_US.po  

3. Edit the en_US.po file to translate it, using a text editor or using poedit (see Modify the text strings on the lines beginning with 'msgstr', DO NOT change any lines beginning with 'msgid'. If required, comments can be added to the file by beginning the comment line with a '#' character. Eg.:-

# Localizer's comment here
msgid "Object colour is %s"
msgstr "Object color is %s"

A %s or %d appearing in a string indicates a runtime string or numeric value (respectively) that is "plugged into" the string when it's displayed. In the example above, the %s indicates a color name (eg. "red") that appears in the message when it's displayed. It's important that these markers are maintained and positioned at the appropriate point in the translated string.

4. Generate a gmo file from your translated po file using:-

msgfmt -c -o en_US.po

5. Install the gmo file (running as root) using:-

cp /usr/share/locale/en_US/LC_MESSAGES/

6. To test your translation, set environment variable LC_MESSAGES to the language required:-

export LC_MESSAGES=en_US

7. Run up Xara Xtreme and it should be using your translated messages. 

8. Once you've signed and returned the contributor agreement to Xara (as described at the top of the agreement), submit your translated (or partially translated) po file as described here so it can be included in the offical Xara Xtreme distribution! Also once you've submitted a partially translated file and it's been included into the Xara Xtreme source, that allows other translators to help complete the translation.

PO File Merging

It's inevitable that as Xara Xtreme is developed the list of messages that need translating will change. New messages will be added and (less often) existing messages changed.

Use the msgmerge command to merge a newer Xara Xtreme po file that does not contain your translations with your older po file containing your translations. This tool will perform an intelligent merge of the 2 files, allowing you to just translate the new and changed messages to bring your translation up to date with the latest program.

This means that translation work on Xara Xtreme can start right now because maintaining and updating the translations should be easy as the product evolves.



Last Updated ( Saturday, 12 August 2006 11:52 )