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:
Yngve Høiseth 2021-01-31 21:05:17 +01:00 committed by GitHub
parent 0298f81167
commit c531f8cbfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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`