t
A translation from the theme’s locale files.
Keys are dotted paths in locales/<language>.json. Pass variables as key: value; count picks the plural form (Arabic has zero, one, two, few, many and other). Keys ending in _html may contain markup; other values are escaped. Missing keys fall back to the default locale, then to the key itself.
Syntax
Section titled “Syntax”'section.key' | t: name: value, count: nReturns
Section titled “Returns”string
Examples
Section titled “Examples”{"cart":{"count":{"one":"{{ count }} item","other":"{{ count }} items"}}}{"cart":{"count":{"zero":"لا منتجات","one":"منتج واحد","two":"منتجان","few":"{{ count }} منتجات","many":"{{ count }} منتجاً","other":"{{ count }} منتج"}}}{{ 'cart.count' | t: count: 3 }}3 itemsArabic plural forms
Section titled “Arabic plural forms”{"cart":{"count":{"one":"{{ count }} item","other":"{{ count }} items"}}}{"cart":{"count":{"zero":"لا منتجات","one":"منتج واحد","two":"منتجان","few":"{{ count }} منتجات","many":"{{ count }} منتجاً","other":"{{ count }} منتج"}}}{{ 'cart.count' | t: count: 2 }} · {{ 'cart.count' | t: count: 3 }} · {{ 'cart.count' | t: count: 11 }}منتجان · 3 منتجات · 11 منتجاًRelated
Section titled “Related”Compatibility
Section titled “Compatibility”Since theme platform 1.0.
Was this page helpful?

