curl -X POST "https://api-integration.ollang.com/integration/content/import" \
-H "X-Api-Key: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"targetLanguage": "de",
"translations": [
{ "sourceText": "Good morning", "targetText": "Guten Morgen" },
{ "sourceText": "Sign in", "targetText": "Anmelden" },
{ "sourceText": "Dashboard", "targetText": "Übersicht" }
]
}'
const response = await fetch(
"https://api-integration.ollang.com/integration/content/import",
{
method: "POST",
headers: {
"X-Api-Key": "<your-api-key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
targetLanguage: "de",
translations: [
{ sourceText: "Good morning", targetText: "Guten Morgen" },
{ sourceText: "Sign in", targetText: "Anmelden" },
{ sourceText: "Dashboard", targetText: "Übersicht" },
],
}),
},
);
const result = await response.json();
// { success: true, imported: 3 }
import requests
data = {
"targetLanguage": "de",
"translations": [
{"sourceText": "Good morning", "targetText": "Guten Morgen"},
{"sourceText": "Sign in", "targetText": "Anmelden"},
{"sourceText": "Dashboard", "targetText": "Übersicht"},
],
}
response = requests.post(
"https://api-integration.ollang.com/integration/content/import",
json=data,
headers={"X-Api-Key": "<your-api-key>"},
)
result = response.json()
$data = [
'targetLanguage' => 'de',
'translations' => [
['sourceText' => 'Good morning', 'targetText' => 'Guten Morgen'],
['sourceText' => 'Sign in', 'targetText' => 'Anmelden'],
['sourceText' => 'Dashboard', 'targetText' => 'Übersicht'],
],
];
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api-integration.ollang.com/integration/content/import',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'X-Api-Key: <your-api-key>',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode($data),
]);
$response = curl_exec($curl);
curl_close($curl);
package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
data := map[string]interface{}{
"targetLanguage": "de",
"translations": []map[string]string{
{"sourceText": "Good morning", "targetText": "Guten Morgen"},
{"sourceText": "Sign in", "targetText": "Anmelden"},
{"sourceText": "Dashboard", "targetText": "Übersicht"},
},
}
jsonData, _ := json.Marshal(data)
req, _ := http.NewRequest("POST",
"https://api-integration.ollang.com/integration/content/import",
bytes.NewBuffer(jsonData))
req.Header.Set("X-Api-Key", "<your-api-key>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
client.Do(req)
}
{
"success": true,
"imported": 3
}
{
"statusCode": 400,
"message": [
"targetLanguage should not be empty",
"translations should not be empty"
],
"error": "Bad Request"
}
{
"error": "Unauthorized",
"message": "Invalid or missing API key",
"code": "UNAUTHORIZED"
}
Ollang API Reference
Import Content
Import translation units into your content database
POST
/
integration
/
content
/
import
curl -X POST "https://api-integration.ollang.com/integration/content/import" \
-H "X-Api-Key: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"targetLanguage": "de",
"translations": [
{ "sourceText": "Good morning", "targetText": "Guten Morgen" },
{ "sourceText": "Sign in", "targetText": "Anmelden" },
{ "sourceText": "Dashboard", "targetText": "Übersicht" }
]
}'
const response = await fetch(
"https://api-integration.ollang.com/integration/content/import",
{
method: "POST",
headers: {
"X-Api-Key": "<your-api-key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
targetLanguage: "de",
translations: [
{ sourceText: "Good morning", targetText: "Guten Morgen" },
{ sourceText: "Sign in", targetText: "Anmelden" },
{ sourceText: "Dashboard", targetText: "Übersicht" },
],
}),
},
);
const result = await response.json();
// { success: true, imported: 3 }
import requests
data = {
"targetLanguage": "de",
"translations": [
{"sourceText": "Good morning", "targetText": "Guten Morgen"},
{"sourceText": "Sign in", "targetText": "Anmelden"},
{"sourceText": "Dashboard", "targetText": "Übersicht"},
],
}
response = requests.post(
"https://api-integration.ollang.com/integration/content/import",
json=data,
headers={"X-Api-Key": "<your-api-key>"},
)
result = response.json()
$data = [
'targetLanguage' => 'de',
'translations' => [
['sourceText' => 'Good morning', 'targetText' => 'Guten Morgen'],
['sourceText' => 'Sign in', 'targetText' => 'Anmelden'],
['sourceText' => 'Dashboard', 'targetText' => 'Übersicht'],
],
];
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api-integration.ollang.com/integration/content/import',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'X-Api-Key: <your-api-key>',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode($data),
]);
$response = curl_exec($curl);
curl_close($curl);
package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
data := map[string]interface{}{
"targetLanguage": "de",
"translations": []map[string]string{
{"sourceText": "Good morning", "targetText": "Guten Morgen"},
{"sourceText": "Sign in", "targetText": "Anmelden"},
{"sourceText": "Dashboard", "targetText": "Übersicht"},
},
}
jsonData, _ := json.Marshal(data)
req, _ := http.NewRequest("POST",
"https://api-integration.ollang.com/integration/content/import",
bytes.NewBuffer(jsonData))
req.Header.Set("X-Api-Key", "<your-api-key>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
client.Do(req)
}
{
"success": true,
"imported": 3
}
{
"statusCode": 400,
"message": [
"targetLanguage should not be empty",
"translations should not be empty"
],
"error": "Bad Request"
}
{
"error": "Unauthorized",
"message": "Invalid or missing API key",
"code": "UNAUTHORIZED"
}
Import translation units (source text + target text pairs) into your content database. This is useful for bulk-loading translations from external systems, TMS exports, or programmatic workflows.
Imported content terms become immediately available in the Content Management page and can be exported, tagged, and edited.
curl -X POST "https://api-integration.ollang.com/integration/content/import" \
-H "X-Api-Key: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"targetLanguage": "de",
"translations": [
{ "sourceText": "Good morning", "targetText": "Guten Morgen" },
{ "sourceText": "Sign in", "targetText": "Anmelden" },
{ "sourceText": "Dashboard", "targetText": "Übersicht" }
]
}'
const response = await fetch(
"https://api-integration.ollang.com/integration/content/import",
{
method: "POST",
headers: {
"X-Api-Key": "<your-api-key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
targetLanguage: "de",
translations: [
{ sourceText: "Good morning", targetText: "Guten Morgen" },
{ sourceText: "Sign in", targetText: "Anmelden" },
{ sourceText: "Dashboard", targetText: "Übersicht" },
],
}),
},
);
const result = await response.json();
// { success: true, imported: 3 }
import requests
data = {
"targetLanguage": "de",
"translations": [
{"sourceText": "Good morning", "targetText": "Guten Morgen"},
{"sourceText": "Sign in", "targetText": "Anmelden"},
{"sourceText": "Dashboard", "targetText": "Übersicht"},
],
}
response = requests.post(
"https://api-integration.ollang.com/integration/content/import",
json=data,
headers={"X-Api-Key": "<your-api-key>"},
)
result = response.json()
$data = [
'targetLanguage' => 'de',
'translations' => [
['sourceText' => 'Good morning', 'targetText' => 'Guten Morgen'],
['sourceText' => 'Sign in', 'targetText' => 'Anmelden'],
['sourceText' => 'Dashboard', 'targetText' => 'Übersicht'],
],
];
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api-integration.ollang.com/integration/content/import',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'X-Api-Key: <your-api-key>',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode($data),
]);
$response = curl_exec($curl);
curl_close($curl);
package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
data := map[string]interface{}{
"targetLanguage": "de",
"translations": []map[string]string{
{"sourceText": "Good morning", "targetText": "Guten Morgen"},
{"sourceText": "Sign in", "targetText": "Anmelden"},
{"sourceText": "Dashboard", "targetText": "Übersicht"},
},
}
jsonData, _ := json.Marshal(data)
req, _ := http.NewRequest("POST",
"https://api-integration.ollang.com/integration/content/import",
bytes.NewBuffer(jsonData))
req.Header.Set("X-Api-Key", "<your-api-key>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
client.Do(req)
}
Authorizations
This endpoint requires API key authentication. Include your API key in the request header:- Header name:
X-Api-Key - Header value: Your API key from the Ollang dashboard
Body Parameters
The target language code for all translations in this import batch (e.g.,
de, fr, ja). All translation units in the translations array must be
in this language.Array of translation units to import. Each unit represents a source-target text pair.
Show Translation Unit Object
Show Translation Unit Object
The original source text (key). This is used to match and deduplicate content terms across languages.
The translated text in the target language.
Optional element identifier for tracking the origin of this translation (e.g., a DOM element ID, a JSON key path, or a custom reference).
Content type classification. Common values:
text, ui, subtitle, navigation. Defaults to text.Behavior
- If a content term with the same
sourceTextalready exists, a new target entry for the specified language is added (or the existing one is updated). - If the
sourceTextdoes not exist, a new content term is created with the provided translation. - Import is idempotent for the same
sourceText+targetLanguagecombination — re-importing updates the target text.
Response
Whether the import completed successfully.
The number of translation units that were processed.
{
"success": true,
"imported": 3
}
{
"statusCode": 400,
"message": [
"targetLanguage should not be empty",
"translations should not be empty"
],
"error": "Bad Request"
}
{
"error": "Unauthorized",
"message": "Invalid or missing API key",
"code": "UNAUTHORIZED"
}
Was this page helpful?
⌘I