The initial comments "SOME DESCRIPTIVE TITLE", "YEAR" and "FIRST AUTHOR <EMAIL@ADDRESS>, YEAR" ought to be replaced by sensible information. This can be done in any text editor; if Emacs is used and it switched to PO mode automatically (because it has recognized the file’s suffix), you can disable it by typing M-x fundamental-mode.
Modifying the header entry can already be done using PO mode: in Emacs, type M-x po-mode RET and then RET again to start editing the entry. You should fill in the following fields.
This is the name and version of the package. Fill it in if it has not
already been filled in by
This has already been filled in by
xgettext. It contains an email
address or URL where you can report bugs in the untranslated strings:
This has already been filled in by
You don’t need to fill this in. It will be filled by the PO file editor when you save the file.
Fill in your name and email address (without double quotes).
Fill in the English name of the language, and the email address or homepage URL of the language team you are part of.
Before starting a translation, it is a good idea to get in touch with your translation team, not only to make sure you don’t do duplicated work, but also to coordinate difficult linguistic issues.
In the Free Translation Project, each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project’s homepage, https://translationproject.org/, in the "Teams" area.
Fill in the language code of the language. This can be in one of three forms:
The naming convention ‘ll_CC’ is also the way locales are named on systems based on GNU libc. But there are three important differences:
So, if your locale name is ‘de_DE.UTF-8’, the language specification in PO files is just ‘de’.
Replace ‘CHARSET’ with the character encoding used for your language,
in your locale, or UTF-8. This field is needed for correct operation of the
msgfmt programs, as well as for users whose
locale’s character encoding differs from yours (see How to specify the output character set
You get the character encoding of your locale by running the shell command ‘locale charmap’. If the result is ‘C’ or ‘ANSI_X3.4-1968’, which is equivalent to ‘ASCII’ (= ‘US-ASCII’), it means that your locale is not correctly configured. In this case, ask your translation team which charset to use. ‘ASCII’ is not usable for any language except Latin.
Because the PO files must be portable to operating systems with less advanced
internationalization facilities, the character encodings that can be used
are limited to those supported by both GNU
libc and GNU
libiconv. These are:
In the GNU system, the following encodings are frequently used for the corresponding languages.
ISO-8859-1for Afrikaans, Albanian, Basque, Breton, Catalan, Cornish, Danish, Dutch, English, Estonian, Faroese, Finnish, French, Galician, German, Greenlandic, Icelandic, Indonesian, Irish, Italian, Malay, Manx, Norwegian, Occitan, Portuguese, Spanish, Swedish, Tagalog, Uzbek, Walloon,
ISO-8859-2for Bosnian, Croatian, Czech, Hungarian, Polish, Romanian, Serbian, Slovak, Slovenian,
ISO-8859-5for Macedonian, Serbian,
ISO-8859-13for Latvian, Lithuanian, Maori,
ISO-8859-15for Basque, Catalan, Dutch, English, Finnish, French, Galician, German, Irish, Italian, Portuguese, Spanish, Swedish, Walloon,
CP1251for Bulgarian, Belarusian,
GB18030for simplified writing of Chinese,
BIG5-HKSCSfor traditional writing of Chinese,
UTF-8for any language, including those listed above.
When single quote characters or double quote characters are used in translations for your language, and your locale’s encoding is one of the ISO-8859-* charsets, it is best if you create your PO files in UTF-8 encoding, instead of your locale’s encoding. This is because in UTF-8 the real quote characters can be represented (single quote characters: U+2018, U+2019, double quote characters: U+201C, U+201D), whereas none of ISO-8859-* charsets has them all. Users in UTF-8 locales will see the real quote characters, whereas users in ISO-8859-* locales will see the vertical apostrophe and the vertical double quote instead (because that’s what the character set conversion will transliterate them to).
To enter such quote characters under X11, you can change your keyboard
mapping using the
xmodmap program. The X11 names of the quote
characters are "leftsinglequotemark", "rightsinglequotemark",
"leftdoublequotemark", "rightdoublequotemark", "singlelowquotemark",
Note that only recent versions of GNU Emacs support the UTF-8 encoding: Emacs 20 with Mule-UCS, and Emacs 21. As of January 2001, XEmacs doesn’t support the UTF-8 encoding.
The character encoding name can be written in either upper or lower case. Usually upper case is preferred.
Set this to
This field is optional. It is only needed if the PO file has plural forms. You can find them by searching for the ‘msgid_plural’ keyword. The format of the plural forms field is described in Additional functions for plural forms and Translating plural forms.