title: Supported Languages description: Get a list of all supported languages with their codes
Supported Languages
Get a list of all supported languages with their codes.
Endpoint
GET /v2/supported-languages
Description
Get a list of all supported languages with their codes. TranslatePlus supports 100+ languages for translation.
Use "auto" as the source language code to automatically detect the language of your text.
Headers
X-API-KEY string (required)
: Your API key for authentication
Example Request
curl https://api.translateplus.io/v2/supported-languages \
-H "X-API-KEY: your_api_key"
import requests
url = "https://api.translateplus.io/v2/supported-languages"
headers = {
"X-API-KEY": "your_api_key"
}
response = requests.get(url, headers=headers)
print(response.json())
fetch('https://api.translateplus.io/v2/supported-languages', {
method: 'GET',
headers: {
'X-API-KEY': 'your_api_key'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
const https = require('https');
const options = {
hostname: new URL('https://api.translateplus.io').hostname,
path: '/v2/supported-languages',
method: 'GET',
headers: {
'X-API-KEY': 'your_api_key'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(JSON.parse(responseData));
});
});
req.on('error', (error) => {
console.error('Error:', error);
});
req.end();
<?php
$url = 'https://api.translateplus.io/v2/supported-languages';
$apiKey = 'your_api_key';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-KEY: ' . $apiKey
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode === 200) {
$result = json_decode($response, true);
foreach ($result['supported_languages'] as $name => $code) {
echo $name . ' (' . $code . ')' . "\n";
}
} else {
echo 'Error: ' . $response;
}
Success Response (200 OK)
{
"supported_languages": {
"Auto Detect": "auto",
"English": "en",
"French": "fr",
"Spanish": "es",
"German": "de",
"Chinese (Simplified)": "zh-CN",
"Arabic": "ar",
"Japanese": "ja",
"Russian": "ru",
"Portuguese (Portugal, Brazil)": "pt"
}
}
Response Fields
| Field | Type | Description |
|-------|------|-------------|
| supported_languages | object | Object mapping language names to language codes |
Error Responses
401 Unauthorized
Invalid or missing API key:
{
"detail": "API key is required. Please provide X-API-KEY header."
}
403 Forbidden
Invalid API key:
{
"detail": "Invalid API key. Please verify your API key is valid."
}