Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Latest commit

 

History

History
16 lines (14 loc) · 679 Bytes

translations.md

File metadata and controls

16 lines (14 loc) · 679 Bytes

< Menu

Translations

Translate with token replacement variables

Strings that include variables can be translated using tokens. This is often a special case where simply using {%trans}...{%endtrans} doesn't work. Like when needing to set a variable.

{% set audio_title = 'Hear from @quotee_name at @quotee_organization'|t({'@quotee_name': quotee_name, '@quotee_organization': quotee_organization}) %}

Translations that include variables

In most cases just use {%trans}...{%endtrans} and the string with variable will be available for string translation.

{%trans} 
	Hear from {{ quotee_name }} at {{ quotee_organization }}
{%endtrans}