# Preparation

Make sure that you have the GNU gettext package installed. Grab the latest versions of the source files of &app; in Subversion:

`svn co https://gnomesword.svn.sourceforge.net/svnroot/gnomesword/trunk xiphos`

# Translating

The translation files are in the po directory. Go to the po directory:

`cd po`

The xiphos.pot file contains the strings to be located. Update the pot file:

`intltool-update --pot`

Copy the xiphos.pot file to YOUR-LANG.po file: YOUR-LANG = LL_CC combination. Here 'LL' is an ISO 639 two-letter language code, and 'CC' is an ISO 3166 two-letter country code. 'LL_CC' combinations can be abbreviated as 'LL' to denote the language's main dialect. For example, let's suppose that you speak Portuguese, pt_BR.po is the name of YOUR-LANG.po file if you live in Brazil, but pt.po if you live in Portugual.

`cp xiphos.pot YOUR-LANG.po`

Add YOUR-LANG to the LINGUAS file:

`echo "YOUR-LANG" >> LINGUAS`

Edit the file manually (emacs, vi, gedit) or with one of the available programs for this (gtranslator, poedit, emacs po mode...), creating the translation:

`vi YOUR-LANG.po`

Check the file for errors (IMPORTANT! Don't forget this step):

`msgfmt -cv -o /dev/null YOUR-LANG.po`

Update the .po file from the latest source code

`intltool-update YOUR-LANG.po`

Or update it from the .pot file

`msgmerge YOUR-LANG.po xiphos.pot > YOUR-LANG.po.new`

Compile the translation (you will probably have to be root to do this)

`msgfmt -o /usr/share/locales/YOUR-LANG/LC_MESSAGES/xiphos.mo YOUR-LANG.po`

/usr/share/locales should be changed to whereever your prefix is for building Xiphos (eg, /usr/local/share/locales by default).