t - Liquid Filter Reference - 1.0.0
Filter Name | t |
Group | Theme |
Version | 1.0.0 |
Description
Returns the translation for a given key for the current locale
Examples
{{ 'products.general.title' | t }}
All Products
When variables are passed in:
{{ 'products.general.cta' | t: product: 'Whiz Bang 3000' }}
Order a Whiz Bang 3000 Now!
When a liquid variable is used, it uses the variable’s value:
{{ 'products.general.cta' | t: product: product.name }}
Order a Geronimo 9000 Now!
When an expected variable is not supplied, it leaves the placeholder in place:
{{ 'products.general.cta' | t }}
Order a %{product} Now!
When an unknown key is used:
{{ 'unknown.key' | t }}
missing translation: `unknown.key` for locale: `en`
When an unknown variable is used, it ignores the variable:
{{ 'products.general.title' | t: product: 'Whiz Bang 3000' }}
All Products
Back to Liquid Reference for 1.0.0
Back to Documentation