Content Localization in action
You can query or mutate content localizations via the API or dashboard.
Query
query {
pages {
id
title
slug
locale
localizations(includeCurrent: true) {
locale
title
}
}
}
Mutation
mutation {
createPage(
data: {
title: "Content Localization",
slug: "content-localization"
localizations: {
create: [{
data: {
title: "Inhaltslokalisierung",
},
locale: de
}]
}
}
) {
id
}
}
Response
{
"data": {
"pages": [
{
"id": "ck7g2vs1k00110188fmc81h26",
"title": "Content Localization",
"slug": "content-localization",
"locale": "en",
"localizations": [
{
"locale": "en",
"title": "Content Localization"
},
{
"locale": "de",
"title": "Inhaltslokalisierung"
}
]
}
]
}
}