## Translating GenJ into another language

A translation doesn't require any programming skills and therefore no source file (*.java) have to be processed. The language data is completely separated from the program and is stored in text files. A complete translation consists of 3 parts:

> 1. GenJ program
> 2. reports
> 3. help files

These parts are independent so that the translation can be done step by step or partial (for example GenJ program and reports without the help files). You should use an existing language as sample, e.g. English. The necessary files (language samples) are stored on the CVS server. The GenJ inter page contains further information how to access this server. Another possibility is to send these files via e-mail. In this case please contact the GenJ team or visit the GenJ forum. The directory structure can be slightly different than the CVS structure which is refered to in the following explanations. In both cases directories contain sub directories with files needed to be processed. The parts are translated in the following way.

## GenJ program

All files are encoded in UTF-8. Please make sure that you also use this format in your text editor. The path is `dev/genj/language/[identifiaction of the language sample, e.g. en=englisch, de=german]/genj/`. Only the *.properties files are relevant, where the texts on the right side of the equal sign have to be translated. Texts on the left side of the equal sign remain unchanged.

> Example (en => de)
> cc.menu.file = File (english sample)
> cc.menu.file = Datei (german translation)
> cc.menu.file = Fichier (french translation)

In case of missing translations English is automatically used as default language. The *.properties files have to be renamed so that the identification of the new language with a leading underscore _ is added to the end of the file name. Note: English language files (default language) have no underscore and no language identifaction in the file name.

> Example (en => de, fr)
> resources.properties
> resources_de.properties (german)
> resources_fr.properties (french)

After renaming the directory to the identification of the new language the translation of the program files is ready.

> Example (en => de, fr)
> dev/genj/language/en/genj
> dev/genj/language/de/genj/ (german)
> dev/genj/language/fr/genj/ (french)

## Reports

Here are the *.properties files in `dev/genj/src/report` relevant which are also encoded in UTF-8. A new line has to be added for each entry. Existing entries can be used as sample via copy and paste. On the left side of the equal sign in the new entry a dot followed by language identification has to be added or an existing identification has to be changed that way. Note: English entries (default language) have no dot and no language identification.

> Example (en => de, fr)
> name = Gedcom Statistics
> name.de = Gedcom-Statistik (german)
> name.fr = Statistiques des données Gedcom (french)

The text on the right side of the equal sign has to be translated. English as default language is used for missing translations. Text enclosed by `{}` or `@@` is a placeholder for variables and shouldn't be touched. Escape sequences start with `\` like `\n`. Sequences like `\u00ED` is Unicode which is transformed into readable letters during the execution of GenJ.

> Example (en => de, fr)
> females = Females: {0} ({1}%)
> females.de = Weiblich: {0} ({1}%)
> females.fr = Femmes : {0} ({1}%)

The translation is complete if all entries in all *.properties files haven been processed.

## Help files

The help files are written in the HTML format. Images from `dev/genj/images` are used for demonstration. Relevant *.html files are in `dev/genj/help/[identification of the language sample, e.g. en=english, de=deutsch]`. HTML commands like `<br>` or `</p>` remain unchanged. Only the text is going to be processed. When updating pictures (screenshots) please note the following:

> - The translation of the other parts (GenJ program, reports) should be finished to avoid language mixtures.
> - When using a different look'n feel or layout (graphical appearance) a different program display may occur. In the worst case all screenshots have to be replaced for a uniform layout of the help files.
> - Don't overwrite the existing files in `help/images`, place your screenshots directly in the new `help` directory that you are working on.
> - Use PNG as picture format.

The translation of the help files is ready after renaming the directory in the new language identification umbenannt (see section GenJ program for an example).