Edit on GitHub
Jump to docs navigation

Twig Components / Methods / translate

translate(locale) is a Twig filter to return the field translate into the requested locale.

Parameter Description
locale The requested translation's locale, as a string.
{% set image_nl = record.image|translate('nl') %}

Caution: The |translate filter will return the field in the requested locale, but it will also change the locale of the record.image itself.

Edit this page on GitHub
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.