Skip to content

Localization

Terje Io edited this page Oct 26, 2021 · 3 revisions

Localization (translation) of the application is now possible via two different methods. Both uses BAML and the default locale is en-US. There will be a separate subfolder for each locale containing a resource dll for each component of the application.

It is possible for a translator to parse the components (.dll and .exe files) and create new resource dll's without recompiling by following these instructions from Microsoft. However, I found this to be rather confusing as the .csv file used for the translation step has a lot of noise and not well suited for keeping a translation updated. Even worse is that I did not find any good tool to handle the translation process so I have decided to create my own. This is based on a database and that allows me to automate the process, and to boot allowed me to create, IMO, a simpler and easier to understand process for translators.

The Microsoft way

  • New translation
    Either parse the separate dll's in the en-US folder by the locbaml tool or use stripped down versions of the pre-parsed csv-files located here.

  • Update translation
    Either parse the separate dll's in the locale folder by the locbaml tool or use stripped down versions of the parsed files located in the csv subfolder of the locale found in Locale folder.

New resource dll's can then be created from the translated files and the translation will be instantly available. Zip the folder containing the translated resource dll's and create an issue with the zip-file attached and I will add the translation to the project.

NOTE: I will not accept the intermediate .csv files generated by the locbaml tool as input for new or updated translations.

The ioSender way (preferred)

  • New translation
    Create a folder for the locale and copy the translation.txt file from the default langauge folder to it.

  • Update translation
    Update the translation.txt file from folder for the locale you want to translate.

The file has tab-separated columns and is in UTF-8 encoding. Use an editor that is capable of handling such files or simply drop it into Excel to start translating. The translated text is the last column in this file, be sure to not alter any other colums. When finished either create a pull request or create an issue with the translated file as an attachment.
I will then create an edge version for verification and when verified incorporate it in the next release.

Discussion

This discussion should be used by those who want to participate in the translation effort.

Notes

Some text strings are either loaded from files or from the controller, this applies to alarm and error messages and all the the text in the Settings: Grbl tab.
Translated versions of these has to be created separately. Support for loading translated versions will be added later.

Some text strings are currently not stored in the application in a format that allows them to be extracted, I will address this later.

A locale (language and country) is designated by an ISO-639 language code, followed by a minus character and an ISO-3166 country code. Use this as the folder name for the translation. A list of codes can be found here.

locbaml.exe can be found in the latest release.


2021-10-26

Clone this wiki locally