[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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 --verbose |
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.
5.1 Invoking the msginit
Program5.2 Filling in the Header Entry
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
msginit
Program msginit [option] |
The msginit
program creates a new PO file, initializing the meta
information with values from the user's environment.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
If no inputfile is given, the current directory is searched for the POT file. If it is `-', standard input is read.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The initial comments "SOME DESCRIPTIVE TITLE", "YEAR" and
"FIRST AUTHOR
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
.
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, http://www.iro.umontreal.ca/contrib/po/HTML/, in the "National teams" area.
msgmerge
and msgfmt
programs, as well as for users whose
locale's character encoding differs from yours (see 10.2.4 How to specify the output character set gettext
uses).
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:
ASCII
, ISO-8859-1
, ISO-8859-2
, ISO-8859-3
,
ISO-8859-4
, ISO-8859-5
, ISO-8859-6
, ISO-8859-7
,
ISO-8859-8
, ISO-8859-9
, ISO-8859-13
, ISO-8859-15
,
KOI8-R
, KOI8-U
, CP850
, CP866
, CP874
,
CP932
, CP949
, CP950
, CP1250
, CP1251
,
CP1252
, CP1253
, CP1254
, CP1255
, CP1256
,
CP1257
, GB2312
, EUC-JP
, EUC-KR
, EUC-TW
,
BIG5
, BIG5-HKSCS
, GBK
, GB18030
, SHIFT_JIS
,
JOHAB
, TIS-620
, VISCII
, UTF-8
.
In the GNU system, the following encodings are frequently used for the corresponding languages.
ISO-8859-1
for
Afrikaans, Albanian, Basque, Catalan, Dutch, English, Estonian, Faroese,
Finnish, French, Galician, German, Greenlandic, Icelandic, Indonesian,
Irish, Italian, Malay, Norwegian, Portuguese, Spanish, Swedish,
ISO-8859-2
for
Croatian, Czech, Hungarian, Polish, Romanian, Serbian, Slovak, Slovenian,
ISO-8859-3
for Maltese,
ISO-8859-5
for Macedonian, Serbian,
ISO-8859-6
for Arabic,
ISO-8859-7
for Greek,
ISO-8859-8
for Hebrew,
ISO-8859-9
for Turkish,
ISO-8859-13
for Latvian, Lithuanian,
ISO-8859-15
for
Basque, Catalan, Dutch, English, Finnish, French, Galician, German, Irish,
Italian, Portuguese, Spanish, Swedish,
KOI8-R
for Russian,
KOI8-U
for Ukrainian,
CP1251
for Bulgarian, Byelorussian,
GB2312
, GBK
, GB18030
for simplified writing of Chinese,
BIG5
, BIG5-HKSCS
for traditional writing of Chinese,
EUC-JP
for Japanese,
EUC-KR
for Korean,
TIS-620
for Thai,
UTF-8
for 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",
"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.
8bit
.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |