FOSS Community India

Po file editing

431pages on
this wiki
Add New Page
Talk0 Share

Some BasicsEdit

A .po file is a plain text file.

if you are not familiar with the PO format, gettext documentation is worth reading, especially sections dedicated to this format, e.g. by running:

        info -n '(gettext)PO Files'
        info -n '(gettext)Header Entry'

Note down the string that you wish to translate, translate it and then replace it as shown in the example below. For example


#. Type: text
#. Description
#: ../main-menu.templates:3
msgid "Debian installer main menu"
msgstr ""

After (for example if it is Hindi)

#. Type: text
#. Description
#: ../main-menu.templates:3
msgid "Debian installer main menu"
msgstr "डेबियन संस्थापक मुख्य मेन्य"

Please don't translate variables ( like ${PORT} ). Also check the comment to see if you should should not translate some (like country name has to be in English).

Note: Don't forget to fill in the header information such as copyright, language team, last translator ...

PO file EditorsEdit

Even though po files are plain text files using an editor designed for po file editing is highly recommended. Most of these tools has advanced features such as format checking, rough translation...

  1. poedit
  2. Lokalize
  3. POEditor


You can check if there is any obvious mistakes by running the following command

msgfmt -c <file.po>

You will need GNU gettext package for this command.

Also you can see the details of how many strings translated, how many remains untranslated, how many fuzzy translations are there ... by running the following command

msgfmt --statistics <file.po>

Check your translations against a glossary if one is available for your language. It would ensure a consistent experience (same translation for each word across applications) to the end user.


There are web based tools like pootle and entrans which support collaborative editing.

Also we have basic protocol to collaboratively edit po files on a wiki. This can be useful if you are planning to translate it offline.

Start by claiming or blocking your portion by adding

# --> <put your name here> Starting from here
# .... 

At the starting and

# ...
# --> <put your name here> Ends here
# ...

At the end (ie, on top of the last string you have claimed, see how it is done already if you are not clear)

And don't translate strings which are already claimed which will be lead to effort duplication. You can check if some portion is claimed/blocked by searching for "# -->" (press CTRL+F and type this)

I suggest you create a .po file by combining the headder from this file and the portions which you bolcked and use a po file editor like kbabel to translate. It has many options including that of checking the file for mismatches. Please check for correctness before you put it back on wiki.

The steps are explained with the help of a digram here


More InfoEdit

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki