b5551880f7 | ||
---|---|---|
.. | ||
languages-af.json | ||
languages-ar.json | ||
languages-be.json | ||
languages-bg.json | ||
languages-ca.json | ||
languages-cs.json | ||
languages-da.json | ||
languages-de.json | ||
languages-el.json | ||
languages-enGB.json | ||
languages-eo.json | ||
languages-es.json | ||
languages-esUS.json | ||
languages-et.json | ||
languages-eu.json | ||
languages-fa.json | ||
languages-fi.json | ||
languages-fr.json | ||
languages-frCA.json | ||
languages-fy.json | ||
languages-gl.json | ||
languages-he.json | ||
languages-hi.json | ||
languages-hr.json | ||
languages-hu.json | ||
languages-hy.json | ||
languages-id.json | ||
languages-is.json | ||
languages-it.json | ||
languages-ja.json | ||
languages-ka.json | ||
languages-kab.json | ||
languages-km.json | ||
languages-ko.json | ||
languages-lt.json | ||
languages-lv.json | ||
languages-mn.json | ||
languages-mr.json | ||
languages-nb.json | ||
languages-nl.json | ||
languages-oc.json | ||
languages-pl.json | ||
languages-pt.json | ||
languages-ptBR.json | ||
languages-ro.json | ||
languages-ru.json | ||
languages-sc.json | ||
languages-sk.json | ||
languages-sl.json | ||
languages-sq.json | ||
languages-sr.json | ||
languages-sv.json | ||
languages-te.json | ||
languages-tr.json | ||
languages-uk.json | ||
languages-vi.json | ||
languages-zhCN.json | ||
languages-zhTW.json | ||
languages.json | ||
main-af.json | ||
main-ar.json | ||
main-be.json | ||
main-bg.json | ||
main-ca.json | ||
main-cs.json | ||
main-da.json | ||
main-de.json | ||
main-el.json | ||
main-enGB.json | ||
main-eo.json | ||
main-es.json | ||
main-esUS.json | ||
main-et.json | ||
main-eu.json | ||
main-fa.json | ||
main-fi.json | ||
main-fr.json | ||
main-frCA.json | ||
main-gl.json | ||
main-he.json | ||
main-hi.json | ||
main-hr.json | ||
main-hu.json | ||
main-hy.json | ||
main-id.json | ||
main-is.json | ||
main-it.json | ||
main-ja.json | ||
main-kab.json | ||
main-ko.json | ||
main-lt.json | ||
main-lv.json | ||
main-ml.json | ||
main-mn.json | ||
main-mr.json | ||
main-nb.json | ||
main-nl.json | ||
main-oc.json | ||
main-pl.json | ||
main-pt.json | ||
main-ptBR.json | ||
main-ro.json | ||
main-ru.json | ||
main-sc.json | ||
main-sk.json | ||
main-sl.json | ||
main-sq.json | ||
main-sr.json | ||
main-sv.json | ||
main-te.json | ||
main-tr.json | ||
main-uk.json | ||
main-vi.json | ||
main-zhCN.json | ||
main-zhTW.json | ||
main.json | ||
readme.md | ||
update-translation.js |
readme.md
Jitsi Meet Translation
Jitsi Meet uses i18next library for translation. i18next uses separate json files for each language.
Translating Jitsi Meet
The translation of Jitsi Meet is handled editing manually the language files.
You can use the update-translation.js
script as follows to help you with that:
cd lang
node update-translation.js main-es.json
That will cause the main-es.json
file to be updated with all the missing keys set as empty
strings. All that's missing is for you to fill in the blanks!
Development
If you want to add new functionality for Jitsi Meet and you have texts that need to be translated you must add key and value in main.json file in English for each translatable text. Than you can use the key to get the translated text for the current language.
You can add translatable text in the HTML:
- via attribute on HTML element - add data-i18n attribute with value the key of the translatable text.
<span data-i18n="dialog.OK">OK</span>
You can also use APP.translation.generateTranslationHTML(key, options) to get this HTML code as Javascript string.
APP.translation.generateTranslationHTML("dialog.OK") // returns <span data-i18n="dialog.OK">OK</span>
The value in the options parameter will be added in data-i18n-options attribute of the element.
Note: If you dynamically add HTML elements don't forget to call APP.translation.translateElement(jquery_selector) to translate the text initially.
APP.translation.translateString("dialog.OK") // returns the value for the key of the current language file. "OK" for example.
For the available values of options
parameter for the above methods of translation module see i18next documentation.
Note: It is useful to add attributes in the HTML for persistent HTML elements because when the language is changed the text will be automatically translated.