Document how to get translation for active language (#1329)
This was not obvious for me, so I assume some others might miss it.
This commit is contained in:
parent
0298f81167
commit
c531f8cbfc
|
@ -331,11 +331,12 @@ The format is also taken into account when caching, so a request will be sent tw
|
|||
different formats.
|
||||
|
||||
### `trans`
|
||||
Gets the translation of the given `key`, for the `default_language` or the `lang`uage given
|
||||
Gets the translation of the given `key`, for the `default_language`, the `lang`uage given or the active language:
|
||||
|
||||
```jinja2
|
||||
{{/* trans(key="title") */}}
|
||||
{{/* trans(key="title", lang="fr") */}}
|
||||
{{/* trans(key="title", lang=lang) */}}
|
||||
```
|
||||
|
||||
### `resize_image`
|
||||
|
|
Loading…
Reference in a new issue