Skip to content

Translation

Alexander Koblov edited this page Nov 16, 2022 · 9 revisions

Double Commander supports translations to different languages via files with po format. The encoding of the files is UTF-8.

Table of Contents

Existing translations

Double Commander is currently translated to following languages:

  • Bulgarian
  • Catalan
  • Chinese simplified and Chinese traditional
  • Czech
  • Dutch
  • French
  • German
  • Hungarian
  • Italian
  • Korean
  • Polish
  • Russian
  • Serbian
  • Slovak
  • Slovenian
  • Spanish
  • Ukrainian

How to translate

Translating to a new language

If there is no translation to your language then you need to download a language template file called doublecmd.po. Depending on which version you want to translate download appropriate po file:

Now you need to rename the file to include your language tag as defined by IETF language tag. Usually you will only use two-letter language tag maybe followed by two-letter region code.

Here is a web site that can help you. Enter your language name in Find box. The language name must be in English; refer to the list on Wikipedia to find it. Now press the button and it will find the two letter language code. If you want to mark a specific region for the language then enter the name of the region in the Find box and press the button. Or choose from the box List entry Regions and press the button. It will list all the two-letter region codes.

For example for English spoken in United States it will be en_US (or alternatively en-US). For English spoken in United Kingdom it will be en_GB.

Rename the file by adding the language tag in between doublecmd and po, for example:

 doublecmd.po -> doublecmd.en_US.po

Translate the renamed file as instructed in the section below.

Updating existing translation

If a translation to your language already exists then you will need to download it in order to edit it. Find your language file in appropriate version:

It is best to contact the previous translator first so that you can discuss the changes or if you don't agree with some translations. Last translator e-mail should be written at the beginning of each po file.

Editing the language file

You can use a simple text editor to edit the file but it must have UTF-8 support as that is the encoding of the language files. You can also use specific editors for po files such as poedit.

Any % parameters such as %s, %d, %f, etc., should be left alone. The order of them cannot be changed.

For example correct translation to Polish is:

 msgid "Press %s or %s to see nr %d"
 msgstr "Wciśnij %s lub %s aby zobaczyć nr %d"

Incorrect translation is:

 msgid "Press %s or %s to see nr %d"
 msgstr "Aby zobaczyć nr %d wciśnij %s lub %s"

Also all \n substrings should be left alone as they mark end of line.

For example correct translation to Polish is:

 msgid "Press S.\nSee what happens."
 msgstr "Wciśnij S.\nZobacz co się stanie."

Incorrect translation is:

 msgid "Press S.\nSee what happens."
 msgstr "Wciśnij S, aby zobaczyć co się stanie."

When you are done translating please also update the header at the top of the file (poedit might do it for you if you set it up accordingly). Here is an example of a header:

"Project-Id-Version: Double Commander 1.1.0 alpha\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-01-17 23:08+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Full Name <email@address>\n"
"Language-Team: Language <email@address>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Native-Language: English\n"

You should change:

  • Project-Id-Version to the version of Double Commander the translation is for
  • PO-Revision-Date to the date you last updated the translation
  • Last-Translator or Language-Team to your name and e-mail address, so that other people can contact you if they want to update the translation or spot any mistakes
  • X-Native-Language to the name of your language at your language

About fuzzy entries (fuzzy translation)

Each PO file entry may have a set of attributes, which are qualities given a name and explicitly associated with the translation, using a special system comment. One of these attributes has the name fuzzy, and entries having this attribute are said to have a fuzzy translation. If translated entry have attribute fuzzy then programs ignore this entry and it means that entry require revision by the translator.

For example:

#: tfrmoptionsfilesviews.lblnewfilesposition.caption
#, fuzzy
#| msgid "&Insert new files"
msgid "&Insert new files:"
msgstr "Neue Date&ien einfügen"

where

  • #, fuzzy - attribute fuzzy,
  • msgid "&Insert new files:" - new string, used at this moment,
  • #| msgid "&Insert new files" - previous variant (not necessary),
  • msgstr "Neue Date&ien einfügen" - previous variant of translation.
If you use a special program for PO-file editing (like as POEdit) then you need just to correct translation and save file, but if you use usual or advanced text editor and edit manually then you need:
  • fix translation in msgstr "...";
  • delete fuzzy-marker;
  • delete previous variant (if exists).
Result for our example:
#: tfrmoptionsfilesviews.lblnewfilesposition.caption
msgid "&Insert new files:"
msgstr "Neue Date&ien einfügen:"