4. TypeFriendly
4.3. Multilingual documentation
4.2. Output interface
« Previous
5. Appendix
Next »

4.3. Multilingual documentation

This chapter describes, how to use multilingual tools available in TypeFriendly.

TypeFriendly assumes that one language works as a primary (base) language which is used to create the original text. The other languages are the translations (called derived languages). We set the primary language in the project configuration, using the baseLanguage option. Each language has a two-letter code, for example en, de, pl.

In order to make a documentation in a new language, we create a folder in the /input directory whose name is the language code. Then, we translate the chapters. When we generate the output in the derived language, TypeFriendly checks the structure of the base language files. If some chapter does not exist in the derived language, the original content is used instead. This means that you can create new derived language files in you want to translate them, and the "missing" files will remain untranslated.

TypeFriendly also translates some manual interface messages. The texts assigned to the messages are defined in the /languages directory. The subdirectories represent each language currently available. The message is a part of a group and has its own unique ID used to find it. The groups are located in separate files that look like this:

; a comment

identifier1 = "Text 1"
identifier2 = "Text 2"
identifier3 = "Text 3"
; etc.

To translate the manual interface, create a new directory in /languages using the language code as the name, take the files from one of existing languages and simply replace the message texts. Remember - if one of the messages is missing, TypeFriendly tries to load it from the base language. The exception is generated, if the message is missing there, too.


4.3. Multilingual documentation
4. TypeFriendly
« Previous
4.2. Output interface
Next »
5. Appendix