shop_ locale
A language in a store.
To learn how to offer localization options in your theme, refer to Support multiple currencies and languages.
Properties
The text direction of the locale.
Returns
rtlfor right-to-left locales andltrfor left-to-right locales.You can use
directionto set thedirattribute on thehtmlelement, so that the page flows correctly for right-to-left languages.Possible values ltr rtl The ISO code of the locale in IETF language tag format.
Returns
trueif the locale is the store's primary locale. Returnsfalseif not.
{
"direction": "ltr",
"endonym_name": "English",
"iso_code": "en",
"name": "English",
"primary": true,
"root_url": "/"
}
Example
{
"direction": "ltr",
"endonym_name": "English",
"iso_code": "en",
"name": "English",
"primary": true,
"root_url": "/"
}Was this section helpful?