Remove a French product title translation
Description
Translations matching all of the inputs will be removed. In this example, we are removing the product title's French translation that is not specific to any market.
Query
mutation translationsRemove($resourceId: ID!, $translationKeys: [String!]!, $locales: [String!]!) {
translationsRemove(resourceId: $resourceId, translationKeys: $translationKeys, locales: $locales) {
userErrors {
message
field
}
translations {
key
value
}
}
}
Variables
{
"resourceId": "gid://shopify/Product/20995642",
"locales": [
"fr"
],
"translationKeys": [
"title"
]
}
cURL
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2026-04/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "mutation translationsRemove($resourceId: ID!, $translationKeys: [String!]!, $locales: [String!]!) { translationsRemove(resourceId: $resourceId, translationKeys: $translationKeys, locales: $locales) { userErrors { message field } translations { key value } } }",
"variables": {
"resourceId": "gid://shopify/Product/20995642",
"locales": [
"fr"
],
"translationKeys": [
"title"
]
}
}'
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 translationsRemove($resourceId: ID!, $translationKeys: [String!]!, $locales: [String!]!) {
translationsRemove(resourceId: $resourceId, translationKeys: $translationKeys, locales: $locales) {
userErrors {
message
field
}
translations {
key
value
}
}
}`,
{
variables: {
"resourceId": "gid://shopify/Product/20995642",
"locales": [
"fr"
],
"translationKeys": [
"title"
]
},
},
);
const json = await response.json();
return json.data;
}
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 translationsRemove($resourceId: ID!, $translationKeys: [String!]!, $locales: [String!]!) {
translationsRemove(resourceId: $resourceId, translationKeys: $translationKeys, locales: $locales) {
userErrors {
message
field
}
translations {
key
value
}
}
}
QUERY
variables = {
"resourceId": "gid://shopify/Product/20995642",
"locales": [
"fr"
],
"translationKeys": [
"title"
]
}
response = client.query(query: query, variables: variables)
Node.js
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: {
"query": `mutation translationsRemove($resourceId: ID!, $translationKeys: [String!]!, $locales: [String!]!) {
translationsRemove(resourceId: $resourceId, translationKeys: $translationKeys, locales: $locales) {
userErrors {
message
field
}
translations {
key
value
}
}
}`,
"variables": {
"resourceId": "gid://shopify/Product/20995642",
"locales": [
"fr"
],
"translationKeys": [
"title"
]
},
},
});
Shopify CLI
shopify app execute \
--query \
'mutation translationsRemove($resourceId: ID!, $translationKeys: [String!]!, $locales: [String!]!) {
translationsRemove(resourceId: $resourceId, translationKeys: $translationKeys, locales: $locales) {
userErrors {
message
field
}
translations {
key
value
}
}
}' \
--variables \
'{
"resourceId": "gid://shopify/Product/20995642",
"locales": [
"fr"
],
"translationKeys": [
"title"
]
}'
Direct API Access
const response = await fetch('shopify:admin/api/2026-04/graphql.json', {
method: 'POST',
body: JSON.stringify({
query: `
mutation translationsRemove($resourceId: ID!, $translationKeys: [String!]!, $locales: [String!]!) {
translationsRemove(resourceId: $resourceId, translationKeys: $translationKeys, locales: $locales) {
userErrors {
message
field
}
translations {
key
value
}
}
}
`,
variables: {
"resourceId": "gid://shopify/Product/20995642",
"locales": [
"fr"
],
"translationKeys": [
"title"
]
},
}),
});
const { data } = await response.json();
console.log(data);
Response
{
"translationsRemove": {
"userErrors": [],
"translations": [
{
"key": "title",
"value": "L'élément"
}
]
}
}
Remove a French product title translation specific to a market
Description
To remove content that surfaces only to buyers in specific markets, make use of the optional `marketIds` argument. In this example, the targeted market has an ID of `gid://shopify/Market/128989799`.
Query
mutation translationsRemove($resourceId: ID!, $translationKeys: [String!]!, $locales: [String!]!, $marketIds: [ID!]) {
translationsRemove(resourceId: $resourceId, translationKeys: $translationKeys, locales: $locales, marketIds: $marketIds) {
userErrors {
message
field
}
translations {
key
value
market {
id
}
}
}
}
Variables
{
"resourceId": "gid://shopify/Product/20995642",
"locales": [
"fr"
],
"translationKeys": [
"title"
],
"marketIds": [
"gid://shopify/Market/128989799"
]
}
cURL
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2026-04/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "mutation translationsRemove($resourceId: ID!, $translationKeys: [String!]!, $locales: [String!]!, $marketIds: [ID!]) { translationsRemove(resourceId: $resourceId, translationKeys: $translationKeys, locales: $locales, marketIds: $marketIds) { userErrors { message field } translations { key value market { id } } } }",
"variables": {
"resourceId": "gid://shopify/Product/20995642",
"locales": [
"fr"
],
"translationKeys": [
"title"
],
"marketIds": [
"gid://shopify/Market/128989799"
]
}
}'
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 translationsRemove($resourceId: ID!, $translationKeys: [String!]!, $locales: [String!]!, $marketIds: [ID!]) {
translationsRemove(resourceId: $resourceId, translationKeys: $translationKeys, locales: $locales, marketIds: $marketIds) {
userErrors {
message
field
}
translations {
key
value
market {
id
}
}
}
}`,
{
variables: {
"resourceId": "gid://shopify/Product/20995642",
"locales": [
"fr"
],
"translationKeys": [
"title"
],
"marketIds": [
"gid://shopify/Market/128989799"
]
},
},
);
const json = await response.json();
return json.data;
}
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 translationsRemove($resourceId: ID!, $translationKeys: [String!]!, $locales: [String!]!, $marketIds: [ID!]) {
translationsRemove(resourceId: $resourceId, translationKeys: $translationKeys, locales: $locales, marketIds: $marketIds) {
userErrors {
message
field
}
translations {
key
value
market {
id
}
}
}
}
QUERY
variables = {
"resourceId": "gid://shopify/Product/20995642",
"locales": [
"fr"
],
"translationKeys": [
"title"
],
"marketIds": [
"gid://shopify/Market/128989799"
]
}
response = client.query(query: query, variables: variables)
Node.js
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: {
"query": `mutation translationsRemove($resourceId: ID!, $translationKeys: [String!]!, $locales: [String!]!, $marketIds: [ID!]) {
translationsRemove(resourceId: $resourceId, translationKeys: $translationKeys, locales: $locales, marketIds: $marketIds) {
userErrors {
message
field
}
translations {
key
value
market {
id
}
}
}
}`,
"variables": {
"resourceId": "gid://shopify/Product/20995642",
"locales": [
"fr"
],
"translationKeys": [
"title"
],
"marketIds": [
"gid://shopify/Market/128989799"
]
},
},
});
Shopify CLI
shopify app execute \
--query \
'mutation translationsRemove($resourceId: ID!, $translationKeys: [String!]!, $locales: [String!]!, $marketIds: [ID!]) {
translationsRemove(resourceId: $resourceId, translationKeys: $translationKeys, locales: $locales, marketIds: $marketIds) {
userErrors {
message
field
}
translations {
key
value
market {
id
}
}
}
}' \
--variables \
'{
"resourceId": "gid://shopify/Product/20995642",
"locales": [
"fr"
],
"translationKeys": [
"title"
],
"marketIds": [
"gid://shopify/Market/128989799"
]
}'
Direct API Access
const response = await fetch('shopify:admin/api/2026-04/graphql.json', {
method: 'POST',
body: JSON.stringify({
query: `
mutation translationsRemove($resourceId: ID!, $translationKeys: [String!]!, $locales: [String!]!, $marketIds: [ID!]) {
translationsRemove(resourceId: $resourceId, translationKeys: $translationKeys, locales: $locales, marketIds: $marketIds) {
userErrors {
message
field
}
translations {
key
value
market {
id
}
}
}
}
`,
variables: {
"resourceId": "gid://shopify/Product/20995642",
"locales": [
"fr"
],
"translationKeys": [
"title"
],
"marketIds": [
"gid://shopify/Market/128989799"
]
},
}),
});
const { data } = await response.json();
console.log(data);
Response
{
"translationsRemove": {
"userErrors": [],
"translations": [
{
"key": "title",
"value": "L'élément canadien",
"market": {
"id": "gid://shopify/Market/128989799"
}
}
]
}
}