Browse Source

fix(docs) set proper language for codeblocks in lang/readme.md

factor2
Peter Dave Hello 2 years ago
parent
commit
847d1dd4b7
No account linked to committer's email address
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      lang/readme.md

+ 4
- 4
lang/readme.md View File

10
 
10
 
11
 You can use the `update-translation.js` script as follows to help you with that:
11
 You can use the `update-translation.js` script as follows to help you with that:
12
 
12
 
13
-```js
13
+```sh
14
 cd lang
14
 cd lang
15
 node update-translation.js main-es.json
15
 node update-translation.js main-es.json
16
 ```
16
 ```
29
 * **via attribute on HTML element** - add **data-i18n** attribute with value the key of the translatable text.
29
 * **via attribute on HTML element** - add **data-i18n** attribute with value the key of the translatable text.
30
 
30
 
31
 
31
 
32
- ```
32
+ ```html
33
  <span data-i18n="dialog.OK">OK</span>
33
  <span data-i18n="dialog.OK">OK</span>
34
  ```
34
  ```
35
 
35
 
37
  You can also use APP.translation.generateTranslationHTML(key, options) to get this HTML code as Javascript string.
37
  You can also use APP.translation.generateTranslationHTML(key, options) to get this HTML code as Javascript string.
38
 
38
 
39
 
39
 
40
- ```
40
+ ```js
41
  APP.translation.generateTranslationHTML("dialog.OK") // returns <span data-i18n="dialog.OK">OK</span>
41
  APP.translation.generateTranslationHTML("dialog.OK") // returns <span data-i18n="dialog.OK">OK</span>
42
  ```
42
  ```
43
 
43
 
46
  **Note:** If you dynamically add HTML elements don't forget to call APP.translation.translateElement(jquery_selector) to translate the text initially.
46
  **Note:** If you dynamically add HTML elements don't forget to call APP.translation.translateElement(jquery_selector) to translate the text initially.
47
 
47
 
48
 
48
 
49
- ```
49
+ ```js
50
  APP.translation.translateString("dialog.OK") // returns the value for the key of the current language file. "OK" for example.
50
  APP.translation.translateString("dialog.OK") // returns the value for the key of the current language file. "OK" for example.
51
  ```
51
  ```
52
 
52
 

Loading…
Cancel
Save