Languages
language query parameter.You can get a list of languages defined in your environment to dynamically create a language selector in your app, for example.
Language object
Provides metadata of a language in your environment.
systemobject
Hide child attributes
idstring
The language's ID.
namestring
The language's name.
codenamestring
The language's codename.
JSON
{
"system": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "Default language",
"codename": "default"
}
}List languages
Retrieve a list of active languages. By default, the API returns all languages ordered alphabetically by codename.
Get only the languages you needTo retrieve specific languages, use the filtering parameters in your requests. For example, you can request two specific languages (using the
[in] filter) or all but one language (using the [neq] filter).GET
https://deliver.kontent.ai/{environment_id}/languagesGET
https://preview-deliver.kontent.ai/{environment_id}/languagesRequest
Path parameters
environment_idrequired · string
Identifies your environment.
Query parameters
skipnumber · int32
Sets the number of objects to skip when requesting a list of objects. The
skip parameter must be combined with the limit parameter to work. If skip is not specified, the API returns the first page of results.You can combine the limit and skip parameters to specify page size and page number. For example, using limit=10&skip=10 sets the page size to 10 and gets the second page of results.limitnumber · int32
Sets the number of objects to retrieve in a single request. If the
limit parameter is not specified, the API returns all requested objects by default.If limit is lower than the total number of objects matching your query, the next_page property in the pagination object of the API response will contain a URL to the next page of results.
The limit parameter affects only the number of items in the items property. It doesn't reduce the number of linked items in the modular_content property so you may hit the response size limit unexpectedly. You can set depth=0 to avoid that.orderstring
Determines the order of the returned languages. By default, the languages are sorted alphabetically by their codenames from A to Z.To sort the languages in a specific order, use the
asc and desc modifiers in square brackets. For example, to sort by language name in ascending order, use order=system.name[asc]. Similarly, to sort in descending order, use the [desc] modifier.Request samples
TypeScript
C#
cURL
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascript
import { createDeliveryClient } from '@kontent-ai/delivery-sdk';
const deliveryClient = createDeliveryClient({
environmentId: 'KONTENT_AI_ENVIRONMENT_ID',
});
const response = await deliveryClient.languages().limitParameter(3).toPromise();
Response
Status (200)
A list of active languages matching the specified parameters.
languages[]array · min. 1 items · unique items
Active languages available in the environment.
Show child attributes
paginationobject
Information about the current page of results.
Show child attributes
Example responses
200
{
"languages": [
{
"system": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "Default language",
"codename": "default"
}
},
{
"system": {
"id": "614d82f5-c16c-465b-a34b-a37a1b416d12",
"name": "German",
"codename": "de-DE"
}
},
{
"system": {
"id": "de7bffee-659e-495f-b462-073974c88147",
"name": "English",
"codename": "en-US"
}
}
],
"pagination": {
"skip": 0,
"limit": 3,
"count": 3,
"next_page": "https://deliver.kontent.ai/<ENVIRONMENT_ID>/languages?limit=3&skip=3"
}
}