Manage shop locales with the GraphQL Admin API
ShopLocale type provides the list of primary and alternate locales on a shop. Each locale has two attributes: primary and published. Only one locale can be the primary locale at a time, but you can't change the primary locale using the API. A shop can have multiple locales in the published or unpublished states.
Shop locale access scopesAnchor link to section titled "Shop locale access scopes"
To use the shop locale GraphQL mutations, your app needs to request the
write_locales access scope for a Shopify store. For more information on requesting access scopes when your app is installed, see OAuth. You can also enable or publish a locale from the Shopify admin.
Locale formatsAnchor link to section titled "Locale formats"
Shopify accepts locales in the following formats:
|Tag format||Example tag||Description|
|Language subtag only||en||English|
|Language subtag + region subtag||en-UK||English as spoken in the UK.|
Retrieve a list of available localesAnchor link to section titled "Retrieve a list of available locales"
The following query retrieves a list of locales that you can enable for a shop, including their ISO country code and name.
Retrieve a shop's localesAnchor link to section titled "Retrieve a shop's locales"
The following query retrieves a list of the shop's enabled locales, including the locale tag, the published state, and whether it is the primary tag.
Enable a localeAnchor link to section titled "Enable a locale"
A locale must be enabled before it can be published. The
shopLocaleEnable mutation takes a locale tag. You can request the shop locale in the response to verify that the locale was enabled correctly. Shops are limited to 20 enabled locales.
Publish a localeAnchor link to section titled "Publish a locale"
Shop locale webhooksAnchor link to section titled "Shop locale webhooks"
You can subscribe to the following Shop locale webhooks:
locale/updatefires when a locale is changed or published.
locale/createfires when a locale is enabled.