-
Notifications
You must be signed in to change notification settings - Fork 36
How to localize GeoEasy to my mother tongue?
Clone/fork the GeoEasy GitHub repo.
Make a copy of the geo_easy.eng file using the iso language code of the new language, for example for Czech the file name should be geo_easy.cze. The three character language codes are preferred, aliases can be added like two character language codes. Please use lower case letters for language code. Region names (like en-us) are not supported jet. From version 3.1.1 language files are moved into i18n subdirectory.
FROM VERSION 3.2.0 THE MESSAGE FILE MUST USE UTF8 CODEPAGE! Since Windows uses different code pages from country to country you should add the Windows code name for the local machine, see https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-input-locales-for-windows-language-packs?view=windows-11 (use the first four characters only).
Open the new file in your favorite text editor, which supports editing UTF8 (nano, vi, notepad++, etc.) and start the translation. The GeoEasy message file is a tcl source file. You should translate the text between quotes in the assignment statements. In tcl assignment statements start with set reserved word.
You can check whether you made a syntax error trying to load the translated file into the tcl shell:
tclsh geo_easy.cze
Add the new language to the geoLangs array in the geo_easy.msk:
array set geoLangs {hun hu eng {en us} ger {ge de} cze {cs}
and add the Windows language code to _langCodes array in geo_easy.msk
array set langCodes {"040E" hun "0409" eng "0407" ger "405" cze}
Start GeoEasy on a system where the default language is the new language you have added or start GeoEasy with the --lang command line switch to select the new language:
GeoEasy --lang cze
Create a pull request to send back your translation.
GeoEasy for all land surveyors