--- url: https://developer.youcan.shop/themes/filters/localization/translate.md --- # Translate Returns a string of translated text for a given translation key from a [locale file](/themes/locales/overview). ::: tip Tip To learn more about using the `t` filter, refer to [storefront locale file](/themes/locales/storefront-locale-files#usage) usage or [schema locale file](/themes/locales/schema-locale-files#usage) usage. ::: ## Example :::code-group ```json [/locales/en.default.json (English)] { "cart": { "page": { "title": "Shopping Cart" } } } ``` ::: :::code-group ```json [/locales/ar.json (Arabic)] { "cart": { "page": { "title": "عربة التسوق" } } } ``` ::: :::code-group ```json [/locales/fr.json (French)] { "cart": { "page": { "title": "Panier" } } } ``` ::: ```liquid {{ "cart.page.title" | t }} ``` The output is customized based on the settings in each locale file: ```html Shopping Cart عربة التسوق Panier ```