Introduction to software localisation for conlangers

Some people have asked on CONLANG-L whether it’s possible to translate free software into constructed languages. I said I would put some instructions together, and people were interested, so here goes.

Caveats:

  1. This is about the free desktop. It will describe how to localise GNOME or KDE. I don’t know anything about how to do this on the Mac or on Windows, so my advice to you will consist approximately of “please install Ubuntu“.
  2. Be sure you know what you’re letting yourself in for. There are about 45,000 strings which need translation in GNOME, although you can get a decent effect by translating only a few thousand. Then there are the applications themselves on top of that.
  3. If you’re translating into a language which uses characters which don’t appear in Unicode, I’m going to assume you’ve already made your computer able to display them. Matters such as designing a character set, getting space in CSUR, and building fonts are outside the scope of this tutorial.
  4. This is just enough to get you going; I’ll be cutting some corners and waving my hands around some of the difficult bits.
  5. Before we start, you should have both the “gettext” package and the Gimp installed.
  6. What I’m going to say is true for most programs, but a few have their own way of doing things.  Firefox is one of these.

Here’s what we’re going to do: we’ll change the titlebar of the GNU Image Manipulation Program (the Gimp) to display in a conlang. Since I’m writing this, I’ll translate the titlebar into my own conlang, Nimyad; work out what it is in yours before you go on. Bear in mind that “GNU” is a proper noun and should not be translated.

The phrase “GNU Image Manipulation Program”, rendered in Nimyad, is “dajath GNU camimoth lirinanen”, or in the con-script:

Next we’ll need an ISO 639 code. These are rather difficult to come by for conlangs (even Toki Pona was rejected), but fortunately the codes between qaa and qtz form a private use area. We’ll say that Nimyad is qny; pick one of your own and use it in what follows.

Now you need the translation template for the Gimp. You can get it here; click the green arrow next to “POT file” and it will download. Now rename the gimp.master.pot file to qny.po and open it in a text editor. (Don’t use Emacs for this; it tries too hard to be helpful and will confuse you.) Find the lines which say

msgid “GNU Image Manipulation Program”
msgstr “”

This means that the string “GNU Image Manipulation Program” is translated to nothing at all. That’s not very useful yet, so put your conlang’s translation in there, after the msgstr, between the quotes. Save the file.

Now we need to compile the .po file into a .mo file, which is the format that the programs themselves can read. Run: msgfmt qny.po

If it worked, you will have a file called messages.mo in the current directory. If it didn’t, make sure you did in fact install the “gettext” package!

Create the locale directory: sudo mkdir -p /usr/share/locale/qny/LC_MESSAGES
and move the file in: sudo mv messages.mo /usr/share/locale/qny/LC_MESSAGES/gimp20.mo

Finally you’ll need to create all the locale data other than the actual language. You can just base that off another locale, such as en_GB, for now: sudo localedef -v -c -i /usr/share/i18n/locales/en_GB -f UTF-8 /usr/lib/locale/qny/

It will probably throw up a lot of errors, which you can ignore at the moment.

When you have a fair number of strings translated, it will make sense to run in the qny locale all the time.  But for now we’ll just run it as needed.  So: now at last you’re ready to type: LANG=qny gimp&

And you should see:

Well, that’s one string down, 45,000 to go.  You see that the strings which haven’t yet been translated fall back to US English.

Finally: now that you’ve seen how easy translation is, if you happen to speak any of these languages, please consider contacting the translation team and offering your help.

Let me know if you have any questions!

2 Responses to “Introduction to software localisation for conlangers”

  1. Oh dear — that brings me back to my own days on the conlang mailing list… And before that, the days when I translated WordPerfect 4.2 into my own conlang using a hex editor.

  2. F Wolff says:

    For lots of information about software localisation, see the localisation guide at the translate project:
    http://translate.sourceforge.net/wiki/guide/

    Also, don’t use a text editor to edit PO files – use a PO editor meant for translation :-) Check out Virtaal:
    http://virtaal.org/