Skip to content

Instantly share code, notes, and snippets.

@briezler
Created December 8, 2022 11:52
Show Gist options
  • Save briezler/dd7ba3de8ffdfb86837b4e9d9ee216bf to your computer and use it in GitHub Desktop.
Save briezler/dd7ba3de8ffdfb86837b4e9d9ee216bf to your computer and use it in GitHub Desktop.
Twig - Translation of variable value
# Translate value
{{ value|trans() }}
# Translate with prefix
{{ ('prefix.' ~ value)|trans() }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment