When starting a new translation, the translator creates a file called `LANG.po´, as a copy of the `package.pot´ template file with modifications in the initial comments (at the beginning of the file) and in the header entry (the first entry, near the beginning of the file).
The easiest way to do so is by use of the `msginit´ program. For example:
$ cd PACKAGE-VERSION $ cd po $ msginit
The alternative way is to do the copy and modifications by hand. To do so, the translator copies `package.pot´ to `LANG.po´. Then she modifies the initial comments and the header entry of this file.
msginit program creates a new PO file, initializing the meta
information with values from the user's environment.
If no inputfile is given, the current directory is searched for the POT file. If it is `-´, standard input is read.
If no output file is given, it depends on the `--locale´ option or the user's locale setting. If it is `-´, the results are written to standard output.
.propertiessyntax, not in PO file syntax.
.stringssyntax, not in PO file syntax.
.propertiessyntax. Note that this file format doesn't support plural forms and silently drops obsolete messages.
.stringssyntax. Note that this file format doesn't support plural forms.
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.
xgettext. It contains an email address or URL where you can report bugs in the untranslated strings:
msgfmtprograms, as well as for users whose locale's character encoding differs from yours (see section 10.2.4 How to specify the output character set
gettextuses). 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
libiconv. These are:
UTF-8. 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, Byelorussian,
GB18030for simplified writing of Chinese,
BIG5-HKSCSfor traditional writing of Chinese,
UTF-8for any language, including those listed above.
xmodmapprogram. The X11 names of the quote characters are "leftsinglequotemark", "rightsinglequotemark", "leftdoublequotemark", "rightdoublequotemark", "singlelowquotemark", "doublelowquotemark". 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.
Go to the first, previous, next, last section, table of contents.