|
@@ -1,20 +1,20 @@
|
1
|
1
|
Jitsi Meet Translation
|
2
|
2
|
==========================
|
3
|
|
-Jitsi Meet uses [i18next](http://i18next.com) library for translation.
|
4
|
|
-i18next uses separate json files for each language.
|
|
3
|
+Jitsi Meet uses [i18next](http://i18next.com) library for translation.
|
|
4
|
+i18next uses separate json files for each language.
|
5
|
5
|
|
6
|
6
|
|
7
|
7
|
Translating Jitsi Meet
|
8
|
8
|
======================
|
9
|
|
-The translation of Jitsi Meet is integrated with Pootle. You can translate Jitsi Meet via our Pootle user interface on
|
10
|
|
-[http://translate.jitsi.org](http://translate.jitsi.org).
|
|
9
|
+The translation of Jitsi Meet is integrated with Pootle. You can translate Jitsi Meet via our Pootle user interface on
|
|
10
|
+[http://translate.jitsi.org](http://translate.jitsi.org).
|
11
|
11
|
|
12
|
12
|
**WARNING: Please don't create or edit manually the language files! Please use our Pootle user interface!**
|
13
|
13
|
|
14
|
14
|
Development
|
15
|
15
|
===========
|
16
|
16
|
If you want to add new functionality for Jitsi Meet and you have texts that need to be translated please use our translation module.
|
17
|
|
-It is located in modules/translation. You must add key and value in main.json file in English for each translatable text.
|
|
17
|
+It is located in modules/translation. You must add key and value in main.json file in English for each translatable text.
|
18
|
18
|
Than you can use the key to get the translated text for the current language.
|
19
|
19
|
|
20
|
20
|
**WARNING: Please don't change the other language files except main.json! They must be updated and translated via our Pootle user interface!**
|
|
@@ -36,21 +36,19 @@ You can add translatable text in the HTML:
|
36
|
36
|
```
|
37
|
37
|
APP.translation.generateTranslationHTML("dialog.OK") // returns <span data-i18n="dialog.OK">OK</span>
|
38
|
38
|
```
|
39
|
|
-
|
|
39
|
+
|
40
|
40
|
The value in the options parameter will be added in data-i18n-options attribute of the element.
|
41
|
|
-
|
|
41
|
+
|
42
|
42
|
**Note:** If you dynamically add HTML elements don't forget to call APP.translation.translateElement(jquery_selector) to translate the text initially.
|
43
|
43
|
|
44
|
|
-* **via Javascript string** - call APP.translation.translateString(key, options). You can use that method to get the translated string in Javascript and then attach it in the HTML.
|
45
|
|
-
|
|
44
|
+
|
46
|
45
|
```
|
47
|
|
- APP.translation.translateString("dialog.OK") // returns the value for the key of the current language file. "OK" for example.
|
|
46
|
+ APP.translation.translateString("dialog.OK") // returns the value for the key of the current language file. "OK" for example.
|
48
|
47
|
```
|
49
|
48
|
|
50
|
|
-For the available values of ``options`` parameter for the above methods of translation module see [i18next documentation](http://i18next.com/pages/doc_features).
|
|
49
|
+For the available values of ``options`` parameter for the above methods of translation module see [i18next documentation](http://i18next.com/pages/doc_features).
|
51
|
50
|
|
52
|
51
|
**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.
|
53
|
|
- Otherwise you should call ``APP.translation.translateString`` and manually change the text every time the language is changed.
|
54
|
52
|
|
55
|
53
|
|
56
|
54
|
|