Internationalization

ShowVoc provides a multilingual UI and support for internationalization.

Currently the built-in languages are english, german and italian, hopefully more to come in the future versions. Anyway ShowVoc provides a mechanism for overcoming such limitation to whoever wants to add further languages. Note: this operation requires to have access to the filesystem of the ShowVoc installation.

The first step to do is to create the translation file. You can start from one of the available translation files and edit it accordingly. The i18n in ShowVoc has been developed using ngx-translate library. Its framework uses translation files written in JSON format.

The translation file needs to be placed under assets/l10n/ folder where those already existing are.

Finally it is necessary to "inform" ShowVoc that a new language is available so that it will be then listed in the language selector. This can be done by editing the svconfig.js file (under src/ of the source package, or under the root folder of the built distribution) and adding the language code to the additional_l10n_langs variable. It is strictly necessary that the language code provided in additional_l10n_langs is the same used to naming the json translation file like in the following example for the chinese language.

The additional language will be then available in the language selector placed at the bottom-right corner of the screen.