The LyX program and its documentation are developed in English. However, many LyX developers and users write or speak other languages. While LyX already supports a bunch of languages, much work remains to be done. Contributions for LyX internationalization are always welcome. There are several sorts of contributions you could make, which are described below.
Note that the main documentation describing how to create these files can be found in the "Customization" document accessible from the LyX Help menu.
There are pages that show the status of translations to different languages in the stable branch. Another page includes general translation hints and advices.
On this page... (hide)
- 1. Menus, Dialogs and error messages
- 2. Documentation
- 2.1 What to Translate
- 2.2 How to Translate
- 3. Typing
- 3.1 Keyboard maps
- 3.2 Key bindings
- 4. Coding!
1. Menus, Dialogs and error messages
Translating the user interface into another language allows users who don't speak English to be much more comfortable with LyX. By "user interface" we mean the menu items, the dialogs and the LyX error messages. If an installation is correctly configured, the correct language should automatically be loaded. LyX uses GNU gettext
for this purpose.
To make a new translation, you need to create a .po
file. Check out the po
directory in the LyX distribution for examples. The current state of the user interface for languages other than English can be found here. Further informations how to proceed with .po files can be found here.
2. Documentation
One of the most useful contributions you can make to the LyX development effort is translating the documentation. Of course, there is a lot of documentation, so you might want some help.
2.1 What to Translate
What order should the documents be translated in? Translate the Tutorial first. That document will be seen by the most new users (hopefully!) and is most likely to be read from start to finish. Few people will read the whole User Guide, and it may be easier to look up one detail in English than to read a whole manual. Of course, the eventual goal is to translate everything.
After the Tutorial, you should translate the Introduction (Intro.lyx
) and the splash document (lib/examples/splash.lyx
), as well as the example documents for the Tutorial (lib/examples/example_*.lyx
). These are very short files, so they'll be easy to translate quickly.
Once these are done, the Users' Guide and Extended Features are the next in line. If you've gotten that far, you probably have a large enough group of volunteers to finish all the rest of the documentation (and keep the translations up to date as the English docs change!) Well done!
2.2 How to Translate
For each document, you should translate foo.lyx
to xx/foo.lyx
(i.e. the same file name in the subdirectory xx
), where xx
is the two-letter ISO 639 code for that language. The German version of the splash page, for example, would be lib/examples/de/splash.lyx
. That way, machines that have been correctly set up will automatically load the correct document. The only exception to this rule is the Tutorial example documents. Since the user loads these explicitly (not through the Help menu), it's better to use a translated version of the file name. For example, the German example documents (which still go in the lib/examples/de
directory) are beispiel_roh.lyx
and beispiel_gelyxt.lyx
.
Translating is very difficult. One thing to keep in mind when you're translating is that English slang and idioms don't necessarily translate exactly into other languages. If the docs describe a person "with the I.Q. of a potato", feel free to use a language-specific idiom for a less that brilliant individual. The same ideas apply to translating jokes, and to the general informal style of the docs. Try to make the document seem like it was originally written in your language, rather than translated!
Translate the latest versions of the docs, and keep current as they change. The Tutorial and other intro documents should be changing only rarely, so it should be easy to keep them current.
3. Typing
There are two different ways to make typing in different languages easier: keyboard maps and key bindings.
3.1 Keyboard maps
Keyboard maps allow users to type in various languages in case there is no appropriate input mechanism for the given environment or language. They allow you either to remap single keys, or to map combinations of keys to certain accented or other characters. To make a new kmap, you just have to create a .kmap
file. Look at the files in the lib/kbd
directory in the LyX distribution for examples.
3.2 Key bindings
Key bindings allow you to use command shortcuts that make sense in a different language. "Alt+c b" makes sense for setting the character style to bold in English, but maybe not in some other languages. To make a new binding, you need to find in the lib/bind
directory of the LyX distribution the file which contains the incorrect bindings. If you want to change the definitions from the menus.bind
file, for example, all you have to do is to create a xx_menus.bind
, where xx
is your country code: LyX will automatically notice your file and use it when the LANG
environment variable points to xx
.
4. Coding!
Finally, we could use your coding help. The LyX 1.5 development effort was substantially extending the internationalization of LyX by incorporating Unicode. Special attention is being given to Asian languages, and right-to-left editing support is in progress. If you've got (or would like) any experience with coding for multi-lingual documents, contact the Developers' mailing list.