Description
Returns the translation for a given key for the current locale
| Property | Value |
|---|---|
| Return Type | string |
| Category | theme |
Examples
{{ "products.general.title" | t }}
Output: All Products
{{ "products.general.cta" | t: product: "Whiz Bang 3000" }}
Output: Order a Whiz Bang 3000 Now!
{{ "products.general.cta" | t: product: product.name }}
Output: Order a Geronimo 9000 Now!
{{ "products.general.cta" | t }}
Output: Order a %{product} Now!
{{ "sc.locale.unknown.key" | t }}
Output: missing translation: sc.locale.unknown.keyfor locale:en``
{% assign key = "products.general.title" %}
{{ key | t }}
Output: All Products