Retrieve supported languages
curl --request GET \
--url https://api.lilt.com/v2/languages \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lilt.com/v2/languages"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lilt.com/v2/languages', 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://api.lilt.com/v2/languages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lilt.com/v2/languages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lilt.com/v2/languages")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lilt.com/v2/languages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"source_to_target": {
"en": {
"da": true,
"de": true,
"fr": true,
"...": "..."
},
"...": "..."
},
"code_to_name": {
"aa": "Afar",
"ab": "Abkhazian",
"af": "Afrikaans",
"...": "..."
}
}"<string>"{
"message": "Internal server error."
}Languages
Retrieve supported languages
Get a list of supported languages.
GET
/
v2
/
languages
Retrieve supported languages
curl --request GET \
--url https://api.lilt.com/v2/languages \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lilt.com/v2/languages"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lilt.com/v2/languages', 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://api.lilt.com/v2/languages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lilt.com/v2/languages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lilt.com/v2/languages")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lilt.com/v2/languages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"source_to_target": {
"en": {
"da": true,
"de": true,
"fr": true,
"...": "..."
},
"...": "..."
},
"code_to_name": {
"aa": "Afar",
"ab": "Abkhazian",
"af": "Afrikaans",
"...": "..."
}
}"<string>"{
"message": "Internal server error."
}Authorizations
BasicAuthApiKeyAuth
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Response
An object listing supported languages and their corresponding locales.
A two-dimensional object in which the first key is an ISO 639-1 language code indicating the source, and the second key is an ISO 639-1 language code indicating the target.
Example:
{ "en": { "da": true, "de": true, "fr": true, "...": "..." }, "...": "..." }
An object in which the key is an ISO 639-1 language code, and the value is the language name.
Example:
{ "aa": "Afar", "ab": "Abkhazian", "af": "Afrikaans", "...": "..." }
Was this page helpful?
⌘I

