Translation

From Double Commander Wiki
Jump to: navigation, search

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

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 0.5.5 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-Poedit-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-Poedit-Language to the name of your language in English
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox