The shop_locale object
The shop_locale
object represents an individual language in a store.
You can access the shop_locale
object through the following object attributes:
- The
available_languages
attribute of thelocalization
object - The
language
attribute of thelocalization
object - The
locale
attribute of therequest
object - The
published_locales
attribute of theshop
object
The shop_locale
object has the following attributes:
shop_locale.endonym_name
Anchor link to section titled "shop_locale.endonym_name"Returns the locale endonym name. For example, "français canadien".
shop_locale.iso_code
Anchor link to section titled "shop_locale.iso_code"Returns the locale code. For example, fr-CA
.
shop_locale.name
Anchor link to section titled "shop_locale.name"Returns the locale name. For example, "Canadian French".
shop_locale.primary
Anchor link to section titled "shop_locale.primary"Returns true
when the locale is the shop's primary locale. Otherwise returns false
.
shop_locale.root_url
Anchor link to section titled "shop_locale.root_url"Returns the root relative URL of the locale.