Dizmo Internationalization
Allows the i18next internationalization library to be integrated into a dizmo.
Build
npm run install
The dist
directory should contain a corresponding i18n-*.min.js
build.
HTML Integration
Add a <script>
tag to the index.html
markup of your dizmo:
Where you should replace the star *
with the corresponding version number.
Node Integration
Install package:
npm install --save generator-dizmo-i18n
Add a require
statement to e.g. the index.js
module of your dizmo:
var i18n = ;
Usage
Invoke i18n
to initialize the translation framework, and then access the translations with the t
function:
;
Translations
Create a assets/locales/translation.en.json
reference translation:
And optionally, create also a assets/locales/translation.de.json
translation:
Service: locize.io
Use locize.io to import, translate and export the translation.*.json
translation files.