t - Liquid Filter Reference
On this page
Description
Returns the translation for a given key for the current locale
| Property | Value |
|---|---|
| Return Type | string |
| Category | theme |
Examples
```liquid
{{ “products.general.title” | t }} ```
Output: All Products
```liquid
{{ “products.general.cta” | t: product: “Whiz Bang 3000” }} ```
Output: Order a Whiz Bang 3000 Now!
```liquid
{{ “products.general.cta” | t: product: product.name }} ```
Output: Order a Geronimo 9000 Now!
```liquid
{{ “products.general.cta” | t }} ```
Output: Order a %{product} Now!
```liquid
{{ “sc.locale.unknown.key” | t }} ```
Output: missing translation: sc.locale.unknown.key for locale: en``
```liquid
{% assign key = “products.general.title” %} {{ key | t }} ```
Output: All Products
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.