2 Localization/Translation FAQ
4 by Ran Rutenberg, Pavel Sanda, Michael Gerz
8 This file is mainly intended for those who have no or little experience using
9 .po files, but want to contribute by translating the LyX interface into their
15 The file you need to edit it an xx.po file where xx stands for your language's
16 two letter code. German would be for example de.po and Polish pl.po. For a list
17 of country codes look at:
19 http://www.gnu.org/software/gettext/manual/html_mono/gettext.html#SEC222
21 If you want to start from scratch than you should obtain a copy of the lyx.pot
25 2) HOW DO I EDIT PO FILES?
27 PO files can be edited with every text editor available for your system (e.g.
28 VIM, NotePad etc.). Yet another option is to use a specialized editor for .po
29 files. You can e.g. use the editors "poEdit" or "jEdit", Linux users can
30 additionally use e.g. "kbabel". Using these editors usually makes things easier
31 as they have many tools to assist the translator.
34 3) WHAT DO I NEED TO TRANSLATE?
36 If your using a simple text editor you should translate the strings that appear
37 in the msgid line and write the translation into the msgstr line. Note that a
38 "#, fuzzy" line is just a hint for translation from compiler - in order to get
39 the translation of the current item working you have to delete this line. It is
40 recommended that you would take a look at another .po file - that way you can
41 get an idea of what to do. If your using a specialized po editor then you will
42 see in it the untranslated strings and a place to write your translation for
46 4) WHAT SHOULD I DO WITH THE '&', '|', '$, AND '%' CHARACTERS?
48 '&' stands for underlined characters (shortcut) in dialog boxes.
49 '|' stands for underlined characters in menus.
51 These chars should be somehow used in your translations, however you'll have to
52 invent your own working shortcuts for dialog and menu entries and resolve
53 possible conflicts of the same shortcut chars in one menu...
55 '$' and '%' are usually used as handlers for formatting or variables to be
56 inserted into the strings. Character sequences like %1$s or %1$d MUST also
57 appear in your translations! Please take them exactly as they are or you may
58 experience crashes when running LyX.
61 5) WHAT IS pocheck.pl AND HOW DO I USE IT?
63 This is a small script located in the "po" directory of the source that helps
64 you find common errors in your translation. In order to use this script you have
65 to have the script language Perl installed.
68 6) HOW CAN I TEST MY TRANSLATION?
70 In order to test your translation you need to obtain the LyX sources (from the
71 SVN repository) and replace the existing .po with yours. Afterwards, you should
72 compile and install LyX (check the INSTALL file for your OS). If you don't
73 install LyX it won't work. For running LyX with your translation, use the
74 appropriate LANG variable:
76 On Linux: LANG=xx_CC lyx
77 On Windows, you need to change the lyx.bat file and write: set LANG=xx_CC
79 xx stands for your language code. CC stands for your country code. So to get,
80 e.g., Czech, the code is "cs_CZ".
84 For some basic idea on how the translation works, you can look at
86 http://en.wikipedia.org/wiki/Gettext
88 For detailed reference, have a look at
90 http://www.gnu.org/software/gettext/manual/gettext.html