Locale
The locale object describes the language and regional settings for the store or customer, including code, name, endonym, and root URL.
Usage Example
{%- comment -%} Show the current locale code, name, and endonym {%- endcomment -%}
<p>
Language: {{ locale.code }} ({{ locale.name }})<br>
Endonym: {{ locale.endonym_name }}<br>
Root URL: {{ locale.root_url }}
</p>
{% if locale.primary %}
<p>This is the store's primary locale.</p>
{% endif %}Properties
endonym_name
Returns the endonym name for this locale.
iso_code
Returns the iso code for this locale.
name
Returns the name.
primary
Returns true if this locale is the shops primary locale.
root_url
Returns the root URL for this locale.