Currently the protoype is available in Czech and English with the ability to change language in runtime.
- react-i18next library is used, which is a React wrapper of i18next.
- translation/dictionary files are located in
src/i18n.js
- configuration of the i18n library is located in
src/i18n.js
- switching between languages occurs in
App.tsx > render > i18n.changeLanguage('en' | 'cs');
- examples of internationalized UI components are found in
/src/gui
(e.g. modal window or rule list)
- offers a function translation
t()
or a React element to be used in templates<Trans>text_to_translate</Trans>
- support for language switch during runtime
- support for interpolation and formatting of variables
- support for plurals
- potentially working dictionary file extractors (translation scanners) 1 2