curl --request POST \
--url https://{subdomain}.nudj.cx/api/v2/admin/languages/{language} \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '
{
"expectedUpdatedAt": "2023-11-07T05:31:56Z",
"translation": {},
"enabled": true,
"reviewedKeys": []
}
'import requests
url = "https://{subdomain}.nudj.cx/api/v2/admin/languages/{language}"
payload = {
"expectedUpdatedAt": "2023-11-07T05:31:56Z",
"translation": {},
"enabled": True,
"reviewedKeys": []
}
headers = {
"x-api-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expectedUpdatedAt: '2023-11-07T05:31:56Z',
translation: {},
enabled: true,
reviewedKeys: []
})
};
fetch('https://{subdomain}.nudj.cx/api/v2/admin/languages/{language}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.nudj.cx/api/v2/admin/languages/{language}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'expectedUpdatedAt' => '2023-11-07T05:31:56Z',
'translation' => [
],
'enabled' => true,
'reviewedKeys' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.nudj.cx/api/v2/admin/languages/{language}"
payload := strings.NewReader("{\n \"expectedUpdatedAt\": \"2023-11-07T05:31:56Z\",\n \"translation\": {},\n \"enabled\": true,\n \"reviewedKeys\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{subdomain}.nudj.cx/api/v2/admin/languages/{language}")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"expectedUpdatedAt\": \"2023-11-07T05:31:56Z\",\n \"translation\": {},\n \"enabled\": true,\n \"reviewedKeys\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.nudj.cx/api/v2/admin/languages/{language}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expectedUpdatedAt\": \"2023-11-07T05:31:56Z\",\n \"translation\": {},\n \"enabled\": true,\n \"reviewedKeys\": []\n}"
response = http.request(request)
puts response.read_body{
"language": "<string>",
"translation": {},
"enabled": true,
"reviewedKeys": []
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authentication required",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient permissions",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "CONFLICT",
"message": "Language configuration was updated by another request",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Update language configuration
Update or replace a language configuration. Omit translation to preserve existing overrides. Empty translation object means ‘use default translations’.
curl --request POST \
--url https://{subdomain}.nudj.cx/api/v2/admin/languages/{language} \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '
{
"expectedUpdatedAt": "2023-11-07T05:31:56Z",
"translation": {},
"enabled": true,
"reviewedKeys": []
}
'import requests
url = "https://{subdomain}.nudj.cx/api/v2/admin/languages/{language}"
payload = {
"expectedUpdatedAt": "2023-11-07T05:31:56Z",
"translation": {},
"enabled": True,
"reviewedKeys": []
}
headers = {
"x-api-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expectedUpdatedAt: '2023-11-07T05:31:56Z',
translation: {},
enabled: true,
reviewedKeys: []
})
};
fetch('https://{subdomain}.nudj.cx/api/v2/admin/languages/{language}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.nudj.cx/api/v2/admin/languages/{language}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'expectedUpdatedAt' => '2023-11-07T05:31:56Z',
'translation' => [
],
'enabled' => true,
'reviewedKeys' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.nudj.cx/api/v2/admin/languages/{language}"
payload := strings.NewReader("{\n \"expectedUpdatedAt\": \"2023-11-07T05:31:56Z\",\n \"translation\": {},\n \"enabled\": true,\n \"reviewedKeys\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{subdomain}.nudj.cx/api/v2/admin/languages/{language}")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"expectedUpdatedAt\": \"2023-11-07T05:31:56Z\",\n \"translation\": {},\n \"enabled\": true,\n \"reviewedKeys\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.nudj.cx/api/v2/admin/languages/{language}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expectedUpdatedAt\": \"2023-11-07T05:31:56Z\",\n \"translation\": {},\n \"enabled\": true,\n \"reviewedKeys\": []\n}"
response = http.request(request)
puts response.read_body{
"language": "<string>",
"translation": {},
"enabled": true,
"reviewedKeys": []
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authentication required",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient permissions",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "CONFLICT",
"message": "Language configuration was updated by another request",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Authorizations
Path Parameters
The language code to update
1 - 10^[A-Za-z0-9_-]+$Body
The input required to update a language configuration. Only overridden translation keys should be included.
Platform configuration version returned by the languages endpoint
Translation key-value pairs. Can contain nested objects. Empty object means 'use default translations'
Show child attributes
Show child attributes
Whether this language is enabled
Dot-paths the translator confirmed as correct even though they match the source (so a same-as-source string still counts as translated)
5000512Response
Successful response
Configuration for platform language and translations
The language code (e.g., 'en', 'fr', 'es')
Translation key-value pairs. Can contain nested objects. Empty object means 'use default translations'
Show child attributes
Show child attributes
Whether this language is enabled
Dot-paths the translator confirmed as correct even though they match the source (so a same-as-source string still counts as translated)
5000512Was this page helpful?

