--- title: shopLocaleEnable - GraphQL Admin description: Adds a locale for a shop. The newly added locale is in the unpublished state. api_version: 2025-10 api_name: admin type: mutation api_type: graphql source_url: html: https://shopify.dev/docs/api/admin-graphql/latest/mutations/shopLocaleEnable md: https://shopify.dev/docs/api/admin-graphql/latest/mutations/shopLocaleEnable.md --- # shop​Locale​Enable mutation Requires `write_locales` access scope. Adds a locale for a shop. The newly added locale is in the unpublished state. ## Arguments * locale [String!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String) required ISO code of the locale to enable. * market​Web​Presence​Ids [\[ID!\]](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) The list of markets web presences to add the locale to. *** ## Shop​Locale​Enable​Payload returns * shop​Locale [Shop​Locale](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopLocale) ISO code of the locale that was enabled. * user​Errors [\[User​Error!\]!](https://shopify.dev/docs/api/admin-graphql/latest/objects/UserError) non-null The list of errors that occurred from executing the mutation. *** ## Examples * ### Enable a locale #### Description A locale must be enabled before it can be published. The shopLocaleEnable mutation takes a locale tag. The shop locale is requested in the response to verify that the localewas enabled correctly. A shop can have up to 20 enabled locales. #### Query ```graphql mutation enableLocale($locale: String!) { shopLocaleEnable(locale: $locale) { userErrors { message field } shopLocale { locale name primary published } } } ``` #### Variables ```json { "locale": "ko" } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/2025-10/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "mutation enableLocale($locale: String!) { shopLocaleEnable(locale: $locale) { userErrors { message field } shopLocale { locale name primary published } } }", "variables": { "locale": "ko" } }' ``` #### React Router ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql mutation enableLocale($locale: String!) { shopLocaleEnable(locale: $locale) { userErrors { message field } shopLocale { locale name primary published } } }`, { variables: { "locale": "ko" }, }, ); const json = await response.json(); return json.data; } ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY mutation enableLocale($locale: String!) { shopLocaleEnable(locale: $locale) { userErrors { message field } shopLocale { locale name primary published } } } QUERY variables = { "locale": "ko" } response = client.query(query: query, variables: variables) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: { "query": `mutation enableLocale($locale: String!) { shopLocaleEnable(locale: $locale) { userErrors { message field } shopLocale { locale name primary published } } }`, "variables": { "locale": "ko" }, }, }); ``` #### Response ```json { "shopLocaleEnable": { "userErrors": [], "shopLocale": { "locale": "ko", "name": "Korean", "primary": false, "published": false } } } ``` * ### shopLocaleEnable reference [Open in GraphiQL](http://localhost:3457/graphiql?query=mutation%20enableLocale\(%24locale%3A%20String!\)%20%7B%0A%20%20shopLocaleEnable\(locale%3A%20%24locale\)%20%7B%0A%20%20%20%20userErrors%20%7B%0A%20%20%20%20%20%20message%0A%20%20%20%20%20%20field%0A%20%20%20%20%7D%0A%20%20%20%20shopLocale%20%7B%0A%20%20%20%20%20%20locale%0A%20%20%20%20%20%20name%0A%20%20%20%20%20%20primary%0A%20%20%20%20%20%20published%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D\&variables=%7B%0A%20%20%22locale%22%3A%20%22ko%22%0A%7D) ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql mutation enableLocale($locale: String!) { shopLocaleEnable(locale: $locale) { userErrors { message field } shopLocale { locale name primary published } } }`, { variables: { "locale": "ko" }, }, ); const json = await response.json(); return json.data; } ``` ##### GQL ``` mutation enableLocale($locale: String!) { shopLocaleEnable(locale: $locale) { userErrors { message field } shopLocale { locale name primary published } } } ``` ##### cURL ``` curl -X POST \ https://your-development-store.myshopify.com/admin/api/2025-10/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "mutation enableLocale($locale: String!) { shopLocaleEnable(locale: $locale) { userErrors { message field } shopLocale { locale name primary published } } }", "variables": { "locale": "ko" } }' ``` ##### React Router ``` import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql mutation enableLocale($locale: String!) { shopLocaleEnable(locale: $locale) { userErrors { message field } shopLocale { locale name primary published } } }`, { variables: { "locale": "ko" }, }, ); const json = await response.json(); return json.data; } ``` ##### Node.js ``` const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: { "query": `mutation enableLocale($locale: String!) { shopLocaleEnable(locale: $locale) { userErrors { message field } shopLocale { locale name primary published } } }`, "variables": { "locale": "ko" }, }, }); ``` ##### Ruby ``` session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY mutation enableLocale($locale: String!) { shopLocaleEnable(locale: $locale) { userErrors { message field } shopLocale { locale name primary published } } } QUERY variables = { "locale": "ko" } response = client.query(query: query, variables: variables) ``` ## Input variables JSON ```json { "locale": "ko" } ``` ## Response JSON ```json { "shopLocaleEnable": { "userErrors": [], "shopLocale": { "locale": "ko", "name": "Korean", "primary": false, "published": false } } } ```