other language

by Micha ⌂, Bad Vilbel, Monday, April 19, 2021, 02:15 (1095 days ago) @ Krzysztof

Dear Krzysztof,

I would like to translate the JAG3D interface into Polish.
Could you tell me if it is possible and, if so, what file(s) is responsible for the interface text?

The language of the user interface is organised by so-called properties files. Properties files are simple ASCII text files. The files are located in JAG3D/resources/i18n. For JAG3D, three files are available, namely: jag3d.properties (English), jag3d_de.properties (German), and jag3d_sr_BA.properties (Bosnia and Herzegovina).

The file without any locale is the default file (here: jag3d.properties). To add, for instance, the Polish file, just create a copy of the default file and rename the copy to jag3d_pl.properties. Depending on the language of your operating system (Windows, Linux, Mac), JAG3D will automatically load the right file from JAG3D/resources/i18n - in case of doubt, the default (English) file.

The files are simple flat files containing a key (used by JAG3D) and a value (the translation). Take a look to the default file. The first two lines are

JavaGraticule3D.button.adjust.label   = Adjust network
JavaGraticule3D.button.adjust.tooltip = Start network adjustment process

Both are related to the "adjustment button". In Polish, the label is (I've used google translate):

JavaGraticule3D.button.adjust.label   = Dostosuj sieć

To avoid encoding conflicts, please use the unicode value for special chars, i.e., \u0107 instead of ć. (Translate the file in normal mode and use search and replace function of your editor):

JavaGraticule3D.button.adjust.label   = Dostosuj sie\u0107

Please remove all key-value pairs, if the Polish translation is equal to the default value. For instance, if the abbreviation for the horizontal distance is denoted by sh (and this abbreviation is a valid value for you). Please remove the line, i.e.,

UITerrestrialObservationTableBuilder.tableheader.value.horizontal_distance.label         = sh

to avoid redundancy. The default file is the fallback case. Missing keys in a specific file are taken from the default file. For that reason, remove redundant information (or untranslated parts).

Let me know, if you have further questions.

kind regards
Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Tags:
i18n, Language, Polish, Properties, Locale

locked
1443 views

Complete thread:

 RSS Feed of thread