Liquid Filter Reference for t - v0.9.5

Filter Name t
Group Theme
Version 0.9.5

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 uses an empty string:
{{ 'products.general.cta' | t }}
Order a  Now!
When an unknown key is used:
{{ 'unknown.key' | t }}
unknown translation key: unknown.key
When an unknown variable is used, it ignores the variable:
{{ 'products.general.title' | t: product: 'Whiz Bang 3000' }}
All Products

Back to Filter List

Back to Liquid Reference for 0.9.5

 

 
Back to Documentation