KonOpas

Readme Config guide Data formats Mailing list Utilities

i18n.js generator

KonOpas uses messageformat.js to enable internationalization. For each translated language, a JSON file composed of "key": "translation" lines is required, with the translations in ICU MessageFormat.

This tool can process the JSON source into the JavaScript that's then included in konopas.min.js. If you want to do that locally, you'll need my patched version of messageformat.js (this may change). To compile a new konopas.min.js, save your JavaScript output as i18n/i18n.js and run make prod in the directory where you've installed KonOpas (requires cURL).

To get started translating, here's the English version of the JSON file. Note that this is a little different from the one included in KonOpas source, as that one has many of the simpler strings stripped out because in English their values are the same as the key, which is defaulted to if no translation is found.

JSON source:
Locale: Select -- to determine from file name, if possible.