Skip to content

getLocale(int locale_id)

The getLocale method is used to get a Locale object that represents locale in the storefront.

Input parameters

locale_id

int Numeric identifier of the locale.

Returned value

The Locale object.

Example

source
{% set locale = ObjectApi.getLocale(locale_id) %}
{{ locale.name }}
output
english