User Tools

Site Tools


Translating the po language files

fldigi uses GNU gettext to handle multiple languages. All the strings are automatically collected in a file that is then translated, and at run time the proper strings are loaded according to the preference of the user.

These files are located in the source directory po. The master language file is po/fldigi.pot. Copy it to po/xx.po and start to edit po/xx.po with your translations (substitute your 2 letter lowercase language designation for the xx). The file contains a lot of groups like this:

#: src/dialogs/fl_digi.cxx:147 src/dialogs/fl_digi.cxx:2372
msgid "Show all modes"
msgstr "Mostra tutti i modi"

The first line is a comment telling you where in the source code this string is present. It may be multiple places like in this example, and there may be more comment lines. The msgid line contains the string in English. Do not change this. The msgstr line contains your translation.

Some editors are capable of recognizing the PO mode and helping you finding strings that have to be translated, or those that have changed in the source code and need adjustments. I use emacs for this task.

You will need to compile and recompile, and recompile again… it's a long and tedious work. It will help if you learn how to use git. I learned it while doing the translation myself. Set up a local git repository, create a branch for yourself (so that your work is not overwritten when you sync the local copy to the remote master) and work on that one. When you have a workable file, produce a patch and send it to fldigi-developer, W1HKJ, Dave. wjp will merge it into the main git repository.

Step by step instructions

(this section is work in progress, apologies for incompleteness and errors)

Setup your local git copy:

$ mkdir build; cd build
$ git clone git://
$ cd fldigi 

Get acquainted with git if you don't know it already. A good read to the ​git user manual will help.

Create a branch for your translation:

$ git checkout -b mylanguage

You can name the branch whatever name you prefer.

Prepare your new translation file:

$ cd po
$ cp fldigi.pot xx.po

Use your language code in place of xx (for example, it.po). Also edit LINGUAS and add your language code to the existing ones, all on one line, separated by a space.

Commit your initial files:

$ git add xx.po
$ git commit -a

This will be your starting point. Doing a git diff master mylanguage now should show the addition to LINGUAS and the new file xx.po.

Edit xx.po.

Having an editor capable of highlighting the syntax of the po file will be of help. I use emacs and the gettext mode (apt-get install gettext-el), which is a good help in finding strings that need translation and avoiding damage to the original strings (which must not be touched). You can do it with any editor and a bit of attention.

Save and get ready to test your changes:

Not Satisfied? Repeat and test the edit. You'll get seriously bored getting all the translations done properly. When you're tired for the day, commit your changes.

$ git commit -a

This will save a history of your translation efforts in your local git repository.

submitted by: Pierfrancesco Caci, ik5pvx

howto/translating_fldigi_for_non-english_hams.txt · Last modified: 2017/07/11 04:25 by m0ift