mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 14:35:27 +00:00
i18n: Add unescape documentation.
This commit is contained in:
@@ -309,6 +309,15 @@ i18n.t('keyWithCount', {count: 100}); // output: '100 items'
|
|||||||
|
|
||||||
For further reading on plurals, read the [official] documentation.
|
For further reading on plurals, read the [official] documentation.
|
||||||
|
|
||||||
|
By default, all text is escaped by i18next. To unescape a text you can use
|
||||||
|
double-underscores followed by a dash `__-` like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
i18n.t('English text with a __- variable__', {'variable': 'Variable value'});
|
||||||
|
```
|
||||||
|
|
||||||
|
For more information, you can read the official [unescape] documentation.
|
||||||
|
|
||||||
### Handlebars templates
|
### Handlebars templates
|
||||||
|
|
||||||
For translations in Handlebars templates we also use `i18n.t`, through two
|
For translations in Handlebars templates we also use `i18n.t`, through two
|
||||||
@@ -378,6 +387,7 @@ organizations from the command line.
|
|||||||
[trans]: http://jinja.pocoo.org/docs/dev/templates/#i18n
|
[trans]: http://jinja.pocoo.org/docs/dev/templates/#i18n
|
||||||
[i18next]: http://i18next.com
|
[i18next]: http://i18next.com
|
||||||
[official]: http://i18next.com/translate/pluralSimple/
|
[official]: http://i18next.com/translate/pluralSimple/
|
||||||
|
[unescape]: https://www.i18next.com/interpolation.html#unescape
|
||||||
[helpers]: http://handlebarsjs.com/block_helpers.html
|
[helpers]: http://handlebarsjs.com/block_helpers.html
|
||||||
[resource]: http://i18next.com/translate/
|
[resource]: http://i18next.com/translate/
|
||||||
[Transifex]: https://transifex.com
|
[Transifex]: https://transifex.com
|
||||||
|
|||||||
Reference in New Issue
Block a user