https://manage.kontent.ai/v2/projects/{environment_id}/languageshttps://manage.kontent.ai/v2/projects/{environment_id}/languages/{language_identifier}https://manage.kontent.ai/v2/projects/{environment_id}/languageshttps://manage.kontent.ai/v2/projects/{environment_id}/languages/{language_identifier}environment_idThe language to be added.
namecodenameexternal_ididnamecodenameenvironment_idlanguage_identifieridnamecodenameenvironment_idx-continuationlanguages[]environment_idlanguage_identifierSpecifies the operations to perform on the existing languages.
opproperty_nameidnamecodenameis_activefallback_languageidexternal_idis_activeis_defaultfallback_languageidexternal_idis_activeis_defaultfallback_languageidpaginationvaluestringexternal_idis_activeis_defaultfallback_languageidcodenameexternal_idname unless you add the language via API.name unless you add the language via API.2ea66788-d3b8-5ff5-b37e-258502e4fd5d), external ID (e.g., external-id/standard-german), or codename (e.g., codename/de-DE).name unless you add the language via API.x-continuation header parameter to the value of the continuation_token property.2ea66788-d3b8-5ff5-b37e-258502e4fd5d), external ID (e.g., external-id/standard-german), or codename (e.g., codename/de-DE).name unless you add the language via API.value property depends on value of the property_name property.property_name of name or codename, the value property is string.property_name of fallback_language, the value property is a Reference object.property_nameis_activevaluecodename property must meet the conditions defined in rules for codenames.external_id property must not contain the following characters: /, ., ;.idnamecodenameexternal_idis_activeis_defaultfallback_languageidcodenameexternal_idname unless you add the language via API.codename property must meet the conditions defined in rules for codenames.external_id property must not contain the following characters: /, ., ;.{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Default language",
"codename": "default",
"external_id": "string",
"is_active": true,
"is_default": true,
"fallback_language": {
"id": "00000000-0000-0000-0000-000000000000"
}
}00000000-0000-0000-0000-000000000000.00000000-0000-0000-0000-000000000000.00000000-0000-0000-0000-000000000000.{
"id": "2ea66788-d3b8-5ff5-b37e-258502e4fd5d",
"name": "German (Germany)",
"codename": "de-DE",
"external_id": "standard-german",
"is_active": true,
"is_default": false,
"fallback_language": {
"id": "00000000-0000-0000-0000-000000000000"
}
}{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Default language",
"codename": "default",
"external_id": "string",
"is_active": true,
"is_default": true,
"fallback_language": {
"id": "00000000-0000-0000-0000-000000000000"
}
}{
"languages": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "Default language",
"codename": "default",
"external_id": "string",
"is_active": true,
"is_default": true,
"fallback_language": {
"id": "00000000-0000-0000-0000-000000000000"
}
},
"pagination": {
"continuation_token": "W3sidG9rZW4iOiIrUklEOn...",
"next_page": "https://manage.kontent.ai/v2/your/chosen/list/endpoint"
}
}00000000-0000-0000-0000-000000000000.// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascript
import { ManagementClient } from '@kontent-ai/management-sdk';
const client = new ManagementClient({
environmentId: 'KONTENT_AI_ENVIRONMENT_ID',
apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',
});
const response = await client
.viewLanguage()
.byLanguageId('2ea66788-d3b8-5ff5-b37e-258502e4fd5d')
// .byLanguageCodename('de-DE')
// .byExternalId('standard-german')
.toPromise();
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascript
import { ManagementClient } from '@kontent-ai/management-sdk';
const client = new ManagementClient({
environmentId: 'KONTENT_AI_ENVIRONMENT_ID',
apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',
});
// Gets the first page of results
const response = await client.listLanguages().toPromise();
// Gets all pages of results
// const response = await client.listLanguages()
// .toAllPromise();
{
"id": "2ea66788-d3b8-5ff5-b37e-258502e4fd5d",
"name": "Deutsch",
"codename": "de-DE",
"external_id": "standard-german",
"is_active": true,
"is_default": false,
"fallback_language": {
"id": "00000000-0000-0000-0000-000000000000"
}
}// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascript
import { ManagementClient } from '@kontent-ai/management-sdk';
const client = new ManagementClient({
environmentId: 'KONTENT_AI_ENVIRONMENT_ID',
apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',
});
const response = await client
.addLanguage()
.withData({
name: 'German (Germany)',
codename: 'de-DE',
is_active: true,
fallback_language: {
codename: 'de-AT',
},
external_id: 'standard-german',
})
.toPromise();
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascript
import { ManagementClient } from '@kontent-ai/management-sdk';
const client = new ManagementClient({
environmentId: 'KONTENT_AI_ENVIRONMENT_ID',
apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',
});
const response = await client
.modifyLanguage()
.byLanguageId('2ea66788-d3b8-5ff5-b37e-258502e4fd5d')
// .byLanguageCodename('de-DE')
// .byExternalId('standard-german')
.withData([
{
op: 'replace',
property_name: 'fallback_language',
value: {
codename: 'en-US',
},
},
{
op: 'replace',
property_name: 'name',
value: 'German',
},
])
.toPromise();