Anchor to shopLocaleDisableshop
shopLocaleDisable
mutation
Requires access scope.
Deletes a locale for a shop. This also deletes all translations of this locale.
Anchor to Arguments
Arguments
- Anchor to localelocale•String!required
ISO code of the locale to delete.
Was this section helpful?
Anchor to ShopLocaleDisablePayload returnsShopLocaleDisablePayload returns
- Anchor to localelocale•
ISO code of the locale that was deleted.
- Anchor to userErrorsuser•
Errors [UserError!]! non-null The list of errors that occurred from executing the mutation.
Was this section helpful?
- Delete the Korean locale from a shop
- shopLocaleDisable reference
Examples
1const { admin } = await authenticate.admin(request);23const response = await admin.graphql(4 `#graphql5 mutation disableLocale($locale: String!) {6 shopLocaleDisable(locale: $locale) {7 userErrors {8 message9 field10 }11 locale12 }13 }`,14 {15 variables: {16 "locale": "ko"17 },18 },19);2021const data = await response.json();22
mutation disableLocale($locale: String!) {
shopLocaleDisable(locale: $locale) {
userErrors {
message
field
}
locale
}
}
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2025-04/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "mutation disableLocale($locale: String!) { shopLocaleDisable(locale: $locale) { userErrors { message field } locale } }",
"variables": {
"locale": "ko"
}
}'
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
mutation disableLocale($locale: String!) {
shopLocaleDisable(locale: $locale) {
userErrors {
message
field
}
locale
}
}`,
{
variables: {
"locale": "ko"
},
},
);
const data = await response.json();
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: {
"query": `mutation disableLocale($locale: String!) {
shopLocaleDisable(locale: $locale) {
userErrors {
message
field
}
locale
}
}`,
"variables": {
"locale": "ko"
},
},
});
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 disableLocale($locale: String!) {
shopLocaleDisable(locale: $locale) {
userErrors {
message
field
}
locale
}
}
QUERY
variables = {
"locale": "ko"
}
response = client.query(query: query, variables: variables)
Input variables
JSON1{2 "locale": "ko"3}
Response
JSON1{2 "shopLocaleDisable": {3 "userErrors": [],4 "locale": "ko"5 }6}