Skip to content

Locales ​

The Locales menu lists the languages the storefront is published in. A locale carries its language code, display name, text direction (ltr / rtl) and an optional logo. Use it to build a language switcher, to know which locale codes you may pass on catalog and content requests, and to render right-to-left layouts correctly.

When a Client Uses This ​

Call the list once on app start to populate a language picker. The code you read here is the value you send as the X-Locale header (or the locale query parameter) on every localised request — catalog, categories, CMS pages, attributes.

What a Locale Row Carries ​

FieldWhy it matters
codeThe value X-Locale expects. The numeric id is not accepted as a locale.
nameDisplay label for a language switcher.
directionltr or rtl. This exists so a client can flip its layout without hardcoding a list of right-to-left languages.
logoPath / logoUrlOptional flag or badge image, null when the store set none.
createdAt / updatedAtnull on locales installed with the store — normal, not an error.

Locale Resolution on Other Endpoints ​

Sending an unknown or disabled X-Locale is not an error: the request falls back to the channel's default locale and returns content in that language instead. Content endpoints report which locale actually answered — a CMS page's translation.locale, a category's translation.locale — so read that back rather than assuming the requested code was honoured.

Locales are configured per channel, so the set enabled on one storefront may differ from another. This endpoint lists every locale the store has, not just the ones the current channel enables; the channel's own set is on its channel record.

Operations in this menu ​

OperationMethod & PathDescription
Get All LocalesGET /api/shop/localesPaginated list of every available locale.
Get Single LocaleGET /api/shop/locales/{id}A single locale by id.

The list is static reference data — cache it and refresh only when the store adds a language.

All Locale endpoints are public reads that require only the storefront key — see Authentication.

Released under the MIT License.