Skip navigation

Get localized content items

Localization in Kentico Kontent allows you to define multiple languages for your project and create culture-specific content. For more information about working with languages, see Localization in Kentico Kontent.

Table of contents

    Choosing a URL pattern

    When developing multilingual web apps, it is a good practice to ensure unique URL addresses for each page.

    1. Language prefixes

    One approach is to use language prefixes in URLs, such as en-us or es-es, to differentiate between content cultures.

    For instance, the URLs can be https://myapp.com/en-us/about-usfor English language and https://myapp.com/es-es/about-us for Spanish language. In this scenario, you get content items in a specific language.

    A worked example

    See an example of adding multi-lingual support to a .NET Core MVC application in a blog post on Working with Localization in Kentico CloudOpens in a new window.

    2. Localized URL slugs

    Another way is to combine the language prefixes with localized names of your content items. That is, using localized URL slugs.

    For example, a URL slug of the About us content item in English is about-us. Translated to Spanish, the URL slug changes to, for example, acerda-de-nosotros. The URL for the About us content item in Spanish becomes https://myapp.com/es-es/acerda-de-nosotros. In this case, you need to retrieve content items by their URL slug value.

    Languages and localization

    Each language in your Kentico Kontent project is uniquely identified by its codename. This codename can be any string you choose, such as, englishen-US, or en-GB.

    Your project's default language

    Every project contains a single default language that cannot be removed. When getting content without specifying a language, the Delivery API returns content in the default language.

    Getting localized content items

    To get localized content, specify the language query string and provide the codename of the requested language. For example, in order to get the On Roasts article in Spanish language, you can retrieve a content item like this /items/on_roasts?language=es-ES.

    • Swift
    // Tip: Find more about Swift SDK at https://docs.kontent.ai/ios import KenticoKontentDelivery let client = DeliveryClient.init(projectId: "8d20758c-d74c-4f59-ae04-ee928c0816b7") // More about strongly-typed models https://github.com/Kentico/kontent-delivery-sdk-swift#using-strongly-typed-models client.getItem(modelType: Article.self, itemName: "about_us", language: "es-ES") { (isSuccess, itemResponse, error) in if isSuccess { if let article = itemResponse?.item { // Use your item here } } else { if let error = error { print(error) } } }
    // Tip: Find more about Swift SDK at https://docs.kontent.ai/ios import KenticoKontentDelivery let client = DeliveryClient.init(projectId: "8d20758c-d74c-4f59-ae04-ee928c0816b7") // More about strongly-typed models https://github.com/Kentico/kontent-delivery-sdk-swift#using-strongly-typed-models client.getItem(modelType: Article.self, itemName: "about_us", language: "es-ES") { (isSuccess, itemResponse, error) in if isSuccess { if let article = itemResponse?.item { // Use your item here } } else { if let error = error { print(error) } } }
    • Java
    // Tip: Find more about Java SDK at https://docs.kontent.ai/java import kentico.kontent.delivery.*; DeliveryClient client = new DeliveryClient("8d20758c-d74c-4f59-ae04-ee928c0816b7"); List<NameValuePair> params = DeliveryParameterBuilder.params().language("es-ES").build(); // Create strongly typed models according to https://docs.kontent.ai/strongly-typed-models CompletionStage<ArticleItem> item = client.getItem("about_us", ArticleItem.class, params);
    // Tip: Find more about Java SDK at https://docs.kontent.ai/java import kentico.kontent.delivery.*; DeliveryClient client = new DeliveryClient("8d20758c-d74c-4f59-ae04-ee928c0816b7"); List<NameValuePair> params = DeliveryParameterBuilder.params().language("es-ES").build(); // Create strongly typed models according to https://docs.kontent.ai/strongly-typed-models CompletionStage<ArticleItem> item = client.getItem("about_us", ArticleItem.class, params);
    • JavaScript
    // Tip: Find more about JS/TS SDKs at https://docs.kontent.ai/javascript const KontentDelivery = require('@kentico/kontent-delivery'); const deliveryClient = new KontentDelivery.DeliveryClient({ projectId: '8d20758c-d74c-4f59-ae04-ee928c0816b7', typeResolvers: [ // Create strongly typed models according to https://docs.kontent.ai/strongly-typed-models new KontentDelivery.TypeResolver('article', (rawData) => new Article) ] }); deliveryClient.item('about_us') .languageParameter('es-ES') .toObservable() .subscribe(response => console.log(response.item));
    // Tip: Find more about JS/TS SDKs at https://docs.kontent.ai/javascript const KontentDelivery = require('@kentico/kontent-delivery'); const deliveryClient = new KontentDelivery.DeliveryClient({ projectId: '8d20758c-d74c-4f59-ae04-ee928c0816b7', typeResolvers: [ // Create strongly typed models according to https://docs.kontent.ai/strongly-typed-models new KontentDelivery.TypeResolver('article', (rawData) => new Article) ] }); deliveryClient.item('about_us') .languageParameter('es-ES') .toObservable() .subscribe(response => console.log(response.item));
    • C#
    // Tip: Find more about .NET SDKs at https://docs.kontent.ai/net using Kentico.Kontent.Delivery; // Creates an instance of the delivery client // ProTip: Use DI for this in your apps https://docs.kontent.ai/net-register-client IDeliveryClient client = DeliveryClientBuilder .WithProjectId("8d20758c-d74c-4f59-ae04-ee928c0816b7") .Build(); // Gets an article in Spanish // Create strongly typed models according to https://docs.kontent.ai/net-strong-types IDeliveryItemResponse<Article> response = await client.GetItemAsync<Article>("about_us", new LanguageParameter("es-ES") ); Article item = response.Item;
    // Tip: Find more about .NET SDKs at https://docs.kontent.ai/net using Kentico.Kontent.Delivery; // Creates an instance of the delivery client // ProTip: Use DI for this in your apps https://docs.kontent.ai/net-register-client IDeliveryClient client = DeliveryClientBuilder .WithProjectId("8d20758c-d74c-4f59-ae04-ee928c0816b7") .Build(); // Gets an article in Spanish // Create strongly typed models according to https://docs.kontent.ai/net-strong-types IDeliveryItemResponse<Article> response = await client.GetItemAsync<Article>("about_us", new LanguageParameter("es-ES") ); Article item = response.Item;
    • PHP
    // Tip: Find more about PHP SDKs at https://docs.kontent.ai/php // Defined by Composer to include required libraries require __DIR__ . '/vendor/autoload.php'; use Kentico\Kontent\Delivery\DeliveryClient; use Kentico\Kontent\Delivery\QueryParams; $client = new DeliveryClient('8d20758c-d74c-4f59-ae04-ee928c0816b7'); $items = client->getItem('about_us', (new QueryParams()) ->language('es-ES'));
    // Tip: Find more about PHP SDKs at https://docs.kontent.ai/php // Defined by Composer to include required libraries require __DIR__ . '/vendor/autoload.php'; use Kentico\Kontent\Delivery\DeliveryClient; use Kentico\Kontent\Delivery\QueryParams; $client = new DeliveryClient('8d20758c-d74c-4f59-ae04-ee928c0816b7'); $items = client->getItem('about_us', (new QueryParams()) ->language('es-ES'));
    • cURL
    curl --request GET \ --url 'https://deliver.kontent.ai/8d20758c-d74c-4f59-ae04-ee928c0816b7/items/about_us?language=es-ES' \ --header 'content-type: application/json'
    curl --request GET \ --url 'https://deliver.kontent.ai/8d20758c-d74c-4f59-ae04-ee928c0816b7/items/about_us?language=es-ES' \ --header 'content-type: application/json'
    • Ruby
    # Tip: Find more about Ruby SDKs at https://docs.kontent.ai/ruby require 'delivery-sdk-ruby' delivery_client = Kentico::Kontent::Delivery::DeliveryClient.new project_id: '8d20758c-d74c-4f59-ae04-ee928c0816b7' delivery_client.item('about_us') .language('es-ES') .execute do |response| item = response.item end
    # Tip: Find more about Ruby SDKs at https://docs.kontent.ai/ruby require 'delivery-sdk-ruby' delivery_client = Kentico::Kontent::Delivery::DeliveryClient.new project_id: '8d20758c-d74c-4f59-ae04-ee928c0816b7' delivery_client.item('about_us') .language('es-ES') .execute do |response| item = response.item end
    • TypeScript
    // Tip: Find more about JS/TS SDKs at https://docs.kontent.ai/javascript import { DeliveryClient, TypeResolver } from '@kentico/kontent-delivery'; import { Article } from './models/Article'; const deliveryClient = new DeliveryClient({ projectId: '8d20758c-d74c-4f59-ae04-ee928c0816b7', typeResolvers: [ // Create strongly typed models according to https://docs.kontent.ai/strongly-typed-models new TypeResolver('article', (rawData) => new Article) ] }); deliveryClient.item<Article>('about_us') .languageParameter('es-ES') .toObservable() .subscribe(response => console.log(response.item));
    // Tip: Find more about JS/TS SDKs at https://docs.kontent.ai/javascript import { DeliveryClient, TypeResolver } from '@kentico/kontent-delivery'; import { Article } from './models/Article'; const deliveryClient = new DeliveryClient({ projectId: '8d20758c-d74c-4f59-ae04-ee928c0816b7', typeResolvers: [ // Create strongly typed models according to https://docs.kontent.ai/strongly-typed-models new TypeResolver('article', (rawData) => new Article) ] }); deliveryClient.item<Article>('about_us') .languageParameter('es-ES') .toObservable() .subscribe(response => console.log(response.item));

    If the specified content item does not exist in the requested language, the Delivery API checks whether the content is present in the fallback language configured for the requested language. In case the query does not match any content, the API returns a 404 error response.

    Getting items by localized URL slug

    Depending on how you implement routing in your app, you might want to request content items based on the knowledge of their URL slugs.

    To retrieve a content item that is specified by a localized URL slug, you need to list content items and apply appropriate filtering parameters.

    For example, to get an About us content item whose URL slug in Spanish is acerda-de-nosotros, you can use a query like this /items?language=es-ES&system.type=article&elements.url_pattern=acerda-de-nosotros.

    Here's what the query strings do:

    • language=es-ES – specifies the codename of the requested language.
    • system.type=article – filters content items by their content type.
    • elements.url_pattern=acerda-de-nosotros – filters content items by a value of a specific content element.
    • Swift
    // Tip: Find more about Swift SDK at https://docs.kontent.ai/ios import KenticoKontentDelivery let client = DeliveryClient.init(projectId:"8d20758c-d74c-4f59-ae04-ee928c0816b7") let customQuery = "items?language=es-ES&system.type=article&elements.url_pattern=acerda-de-nosotros" // More about strongly-typed models https://github.com/Kentico/kontent-delivery-sdk-swift#using-strongly-typed-models client.getItems(modelType: Article.self, customQuery: customQuery) { (isSuccess, itemsResponse, error) in if isSuccess { if let items = itemsResponse?.items { // Use your items here } } else { if let error = error { print(error) } }
    // Tip: Find more about Swift SDK at https://docs.kontent.ai/ios import KenticoKontentDelivery let client = DeliveryClient.init(projectId:"8d20758c-d74c-4f59-ae04-ee928c0816b7") let customQuery = "items?language=es-ES&system.type=article&elements.url_pattern=acerda-de-nosotros" // More about strongly-typed models https://github.com/Kentico/kontent-delivery-sdk-swift#using-strongly-typed-models client.getItems(modelType: Article.self, customQuery: customQuery) { (isSuccess, itemsResponse, error) in if isSuccess { if let items = itemsResponse?.items { // Use your items here } } else { if let error = error { print(error) } }
    • Java
    // Tip: Find more about Java SDK at https://docs.kontent.ai/java import kentico.kontent.delivery.*; DeliveryClient client = new DeliveryClient("8d20758c-d74c-4f59-ae04-ee928c0816b7"); List<NameValuePair> params = DeliveryParameterBuilder.params() .language("es-ES") .filterEquals("system.type", "article") .filterEquals("elements.url_pattern", "acerda-de-nosotros") .build(); // Create strongly typed models according to https://docs.kontent.ai/strongly-typed-models CompletionStage<List<ArticleItem>> items = client.getItems(ArticleItem.class, params);
    // Tip: Find more about Java SDK at https://docs.kontent.ai/java import kentico.kontent.delivery.*; DeliveryClient client = new DeliveryClient("8d20758c-d74c-4f59-ae04-ee928c0816b7"); List<NameValuePair> params = DeliveryParameterBuilder.params() .language("es-ES") .filterEquals("system.type", "article") .filterEquals("elements.url_pattern", "acerda-de-nosotros") .build(); // Create strongly typed models according to https://docs.kontent.ai/strongly-typed-models CompletionStage<List<ArticleItem>> items = client.getItems(ArticleItem.class, params);
    • JavaScript
    // Tip: Find more about JS/TS SDKs at https://docs.kontent.ai/javascript const KontentDelivery = require('@kentico/kontent-delivery'); const deliveryClient = new KontentDelivery.DeliveryClient({ projectId: '8d20758c-d74c-4f59-ae04-ee928c0816b7', typeResolvers: [ // Create strongly typed models according to https://docs.kontent.ai/strongly-typed-models new KontentDelivery.TypeResolver('article', (rawData) => new Article) ] }); deliveryClient.items('article') .type('article') .languageParameter('es-ES') .depthParameter(0) .equalsFilter('elements.url_pattern', 'acerda-de-nosotros') .toObservable() .subscribe(response => console.log(response));
    // Tip: Find more about JS/TS SDKs at https://docs.kontent.ai/javascript const KontentDelivery = require('@kentico/kontent-delivery'); const deliveryClient = new KontentDelivery.DeliveryClient({ projectId: '8d20758c-d74c-4f59-ae04-ee928c0816b7', typeResolvers: [ // Create strongly typed models according to https://docs.kontent.ai/strongly-typed-models new KontentDelivery.TypeResolver('article', (rawData) => new Article) ] }); deliveryClient.items('article') .type('article') .languageParameter('es-ES') .depthParameter(0) .equalsFilter('elements.url_pattern', 'acerda-de-nosotros') .toObservable() .subscribe(response => console.log(response));
    • C#
    // Tip: Find more about .NET SDKs at https://docs.kontent.ai/net using Kentico.Kontent.Delivery; // Creates an instance of the delivery client // ProTip: Use DI for this in your apps https://docs.kontent.ai/net-register-client IDeliveryClient client = DeliveryClientBuilder .WithProjectId("8d20758c-d74c-4f59-ae04-ee928c0816b7") .Build(); // Gets the 'About us' content item in Spanish based on the item's URL slug value // Create strongly typed models according to https://docs.kontent.ai/net-strong-types IDeliveryItemListingResponse<Article> response = await client.GetItemsAsync<Article>( new LanguageParameter("es-ES"), new EqualsFilter("system.type", "article"), new EqualsFilter("elements.url_pattern", "acerda-de-nosotros") ); IList<Article> items = response.Items;
    // Tip: Find more about .NET SDKs at https://docs.kontent.ai/net using Kentico.Kontent.Delivery; // Creates an instance of the delivery client // ProTip: Use DI for this in your apps https://docs.kontent.ai/net-register-client IDeliveryClient client = DeliveryClientBuilder .WithProjectId("8d20758c-d74c-4f59-ae04-ee928c0816b7") .Build(); // Gets the 'About us' content item in Spanish based on the item's URL slug value // Create strongly typed models according to https://docs.kontent.ai/net-strong-types IDeliveryItemListingResponse<Article> response = await client.GetItemsAsync<Article>( new LanguageParameter("es-ES"), new EqualsFilter("system.type", "article"), new EqualsFilter("elements.url_pattern", "acerda-de-nosotros") ); IList<Article> items = response.Items;
    • PHP
    // Tip: Find more about PHP SDKs at https://docs.kontent.ai/php // Defined by Composer to include required libraries require __DIR__ . '/vendor/autoload.php'; use Kentico\Kontent\Delivery\DeliveryClient; use Kentico\Kontent\Delivery\QueryParams; $client = new DeliveryClient('8d20758c-d74c-4f59-ae04-ee928c0816b7'); $items = $client->getItems((new QueryParams()) ->language('es-ES') ->equals('system.type', 'article') ->equals('elements.url_pattern', 'acerda-de-nosotros'));
    // Tip: Find more about PHP SDKs at https://docs.kontent.ai/php // Defined by Composer to include required libraries require __DIR__ . '/vendor/autoload.php'; use Kentico\Kontent\Delivery\DeliveryClient; use Kentico\Kontent\Delivery\QueryParams; $client = new DeliveryClient('8d20758c-d74c-4f59-ae04-ee928c0816b7'); $items = $client->getItems((new QueryParams()) ->language('es-ES') ->equals('system.type', 'article') ->equals('elements.url_pattern', 'acerda-de-nosotros'));
    • cURL
    curl --request GET \ --url 'https://deliver.kontent.ai/8d20758c-d74c-4f59-ae04-ee928c0816b7/items?language=es-ES&system.type=article&elements.url_pattern=acerda-de-nosotros' \ --header 'content-type: application/json'
    curl --request GET \ --url 'https://deliver.kontent.ai/8d20758c-d74c-4f59-ae04-ee928c0816b7/items?language=es-ES&system.type=article&elements.url_pattern=acerda-de-nosotros' \ --header 'content-type: application/json'
    • Ruby
    # Tip: Find more about Ruby SDKs at https://docs.kontent.ai/ruby require 'delivery-sdk-ruby' delivery_client = Kentico::Kontent::Delivery::DeliveryClient.new project_id: '8d20758c-d74c-4f59-ae04-ee928c0816b7' delivery_client.items([ 'system.type'.eq('article'), 'elements.url_pattern'.eq('acerda-de-nosotros') ]) .language('es-ES') .execute do |response| items = response.items end
    # Tip: Find more about Ruby SDKs at https://docs.kontent.ai/ruby require 'delivery-sdk-ruby' delivery_client = Kentico::Kontent::Delivery::DeliveryClient.new project_id: '8d20758c-d74c-4f59-ae04-ee928c0816b7' delivery_client.items([ 'system.type'.eq('article'), 'elements.url_pattern'.eq('acerda-de-nosotros') ]) .language('es-ES') .execute do |response| items = response.items end
    • TypeScript
    // Tip: Find more about JS/TS SDKs at https://docs.kontent.ai/javascript import { DeliveryClient, TypeResolver } from '@kentico/kontent-delivery'; import { Article } from './models/Article'; const deliveryClient = new DeliveryClient({ projectId: '8d20758c-d74c-4f59-ae04-ee928c0816b7', typeResolvers: [ // Create strongly typed models according to https://docs.kontent.ai/strongly-typed-models new TypeResolver('article', (rawData) => new Article) ] }); deliveryClient.items<Article>() .type('article') .languageParameter('es-ES') .depthParameter(0) .equalsFilter('elements.url_pattern', 'acerda-de-nosotros') .toObservable() .subscribe(response => console.log(response));
    // Tip: Find more about JS/TS SDKs at https://docs.kontent.ai/javascript import { DeliveryClient, TypeResolver } from '@kentico/kontent-delivery'; import { Article } from './models/Article'; const deliveryClient = new DeliveryClient({ projectId: '8d20758c-d74c-4f59-ae04-ee928c0816b7', typeResolvers: [ // Create strongly typed models according to https://docs.kontent.ai/strongly-typed-models new TypeResolver('article', (rawData) => new Article) ] }); deliveryClient.items<Article>() .type('article') .languageParameter('es-ES') .depthParameter(0) .equalsFilter('elements.url_pattern', 'acerda-de-nosotros') .toObservable() .subscribe(response => console.log(response));

    If the specified query doesn't match any content items, the Delivery API returns an empty response.

    Ignoring language fallbacks

    To ignore language fallbacks and retrieve content items only in the specified language, you can do so by filtering out any content items whose language is different from the requested one. 

    Exceptions to language fallbacks

    When the Delivery API evaluates language fallbacks for content items, it makes exceptions in the following cases:

    • Links to content items in Rich text elements follow language fallbacks independently.
    • Content items used in Rich text and Linked items elements do NOT follow language fallbacks. This means that whenever linked items are not translated to the requested language, they are not included in the response.

    The table below shows what is returned when working with a project with the default project language set as American English en-US and a second language of Spanish es-ES, which falls back to the default language.

    languagesystem.languageReturned language variant
    es-ESnoneContent items are returned in Spanish. If an item is not translated to Spanish, the fallback language is returned en-US.
    es-ESes-ESContent items are returned in Spanish. If an item is not translated to Spanish, it is not returned.
    es-ESen-USContent items are returned in the fallback language of English. If an item is translated to Spanish, it is not returned.
    • language=es-ES – specifies the codename of the requested language.
    • system.language=es-ES – filters content items by their language variant. Content items that are not translated to the specified language are not returned.

    For example, you can retrieve only the Spanish language variants of content items.

    • Swift
    // Tip: Find more about Swift SDK at https://docs.kontent.ai/ios import KenticoKontentDelivery let client = DeliveryClient.init(projectId:"975bf280-fd91-488c-994c-2f04416e5ee3") let customQuery = "items?language=es-ES&system.language=es-ES" // More about strongly typed models https://github.com/Kentico/kontent-delivery-sdk-swift#using-strongly-typed-models client.getItems(modelType: Article.self, customQuery: customQuery) { (isSuccess, itemsResponse, error) in if isSuccess { if let articles = itemsResponse?.items { // Use your items here } } else { if let error = error { print(error) } }
    // Tip: Find more about Swift SDK at https://docs.kontent.ai/ios import KenticoKontentDelivery let client = DeliveryClient.init(projectId:"975bf280-fd91-488c-994c-2f04416e5ee3") let customQuery = "items?language=es-ES&system.language=es-ES" // More about strongly typed models https://github.com/Kentico/kontent-delivery-sdk-swift#using-strongly-typed-models client.getItems(modelType: Article.self, customQuery: customQuery) { (isSuccess, itemsResponse, error) in if isSuccess { if let articles = itemsResponse?.items { // Use your items here } } else { if let error = error { print(error) } }
    • Java
    // Tip: Find more about Java SDK at https://docs.kontent.ai/java import kentico.kontent.delivery.*; DeliveryClient client = new DeliveryClient("975bf280-fd91-488c-994c-2f04416e5ee3"); List<NameValuePair> params = DeliveryParameterBuilder.params() .language("es-ES") .filterEquals("system.language", "es-ES") .build(); CompletionsStage<ContentItemsListingResponse> listingResponse = client.getItems();
    // Tip: Find more about Java SDK at https://docs.kontent.ai/java import kentico.kontent.delivery.*; DeliveryClient client = new DeliveryClient("975bf280-fd91-488c-994c-2f04416e5ee3"); List<NameValuePair> params = DeliveryParameterBuilder.params() .language("es-ES") .filterEquals("system.language", "es-ES") .build(); CompletionsStage<ContentItemsListingResponse> listingResponse = client.getItems();
    • JavaScript
    // Tip: Find more about JS/TS SDKs at https://docs.kontent.ai/javascript const KontentDelivery = require('@kentico/kontent-delivery'); const deliveryClient = new KontentDelivery.DeliveryClient({ projectId: '975bf280-fd91-488c-994c-2f04416e5ee3', }); deliveryClient.items() .languageParameter('es-ES') .equalsFilter('system.language', 'es-ES') .toObservable() .subscribe(response => console.log(response.items));
    // Tip: Find more about JS/TS SDKs at https://docs.kontent.ai/javascript const KontentDelivery = require('@kentico/kontent-delivery'); const deliveryClient = new KontentDelivery.DeliveryClient({ projectId: '975bf280-fd91-488c-994c-2f04416e5ee3', }); deliveryClient.items() .languageParameter('es-ES') .equalsFilter('system.language', 'es-ES') .toObservable() .subscribe(response => console.log(response.items));
    • C#
    // Tip: Find more about .NET SDKs at https://docs.kontent.ai/net using Kentico.Kontent.Delivery; // Creates an instance of the delivery client // ProTip: Use DI for this in your apps https://docs.kontent.ai/net-register-client IDeliveryClient client = DeliveryClientBuilder .WithProjectId("975bf280-fd91-488c-994c-2f04416e5ee3") .Build(); // Gets the Spanish variant of all content items and ignores language fallbacks IDeliveryItemListingResponse<object> response = await client.GetItemsAsync<object>( new LanguageParameter("es-ES"), new EqualsParameter("system.language", "es-ES") ); IList<object> items = response.Items;
    // Tip: Find more about .NET SDKs at https://docs.kontent.ai/net using Kentico.Kontent.Delivery; // Creates an instance of the delivery client // ProTip: Use DI for this in your apps https://docs.kontent.ai/net-register-client IDeliveryClient client = DeliveryClientBuilder .WithProjectId("975bf280-fd91-488c-994c-2f04416e5ee3") .Build(); // Gets the Spanish variant of all content items and ignores language fallbacks IDeliveryItemListingResponse<object> response = await client.GetItemsAsync<object>( new LanguageParameter("es-ES"), new EqualsParameter("system.language", "es-ES") ); IList<object> items = response.Items;
    • PHP
    // Tip: Find more about PHP SDKs at https://docs.kontent.ai/php // Defined by Composer to include required libraries require __DIR__ . '/vendor/autoload.php'; use Kentico\Kontent\Delivery\DeliveryClient; $client = new DeliveryClient('975bf280-fd91-488c-994c-2f04416e5ee3'); $items = $client->getItems((new QueryParams()) ->language('es-ES') ->equals('system.language', 'es-ES'));
    // Tip: Find more about PHP SDKs at https://docs.kontent.ai/php // Defined by Composer to include required libraries require __DIR__ . '/vendor/autoload.php'; use Kentico\Kontent\Delivery\DeliveryClient; $client = new DeliveryClient('975bf280-fd91-488c-994c-2f04416e5ee3'); $items = $client->getItems((new QueryParams()) ->language('es-ES') ->equals('system.language', 'es-ES'));
    • cURL
    curl --request GET \ --url 'https://deliver.kontent.ai/975bf280-fd91-488c-994c-2f04416e5ee3/items?language=es-ES&system.language=es-ES' \ --header 'content-type: application/json'
    curl --request GET \ --url 'https://deliver.kontent.ai/975bf280-fd91-488c-994c-2f04416e5ee3/items?language=es-ES&system.language=es-ES' \ --header 'content-type: application/json'
    • Ruby
    # Tip: Find more about Ruby SDKs at https://docs.kontent.ai/ruby require 'delivery-sdk-ruby' delivery_client = Kentico::Kontent::Delivery::DeliveryClient.new project_id: '975bf280-fd91-488c-994c-2f04416e5ee3' delivery_client.items(['system.language'.eq('es-ES')]) .language('es-ES') .execute do |response| items = response.items end
    # Tip: Find more about Ruby SDKs at https://docs.kontent.ai/ruby require 'delivery-sdk-ruby' delivery_client = Kentico::Kontent::Delivery::DeliveryClient.new project_id: '975bf280-fd91-488c-994c-2f04416e5ee3' delivery_client.items(['system.language'.eq('es-ES')]) .language('es-ES') .execute do |response| items = response.items end
    • TypeScript
    // Tip: Find more about JS/TS SDKs at https://docs.kontent.ai/javascript import { ContentItem, DeliveryClient } from '@kentico/kontent-delivery'; const deliveryClient = new DeliveryClient({ projectId: '975bf280-fd91-488c-994c-2f04416e5ee3', }); deliveryClient.items<ContentItem>() .languageParameter('es-ES') .equalsFilter('system.language', 'es-ES') .toObservable() .subscribe(response => console.log(response.items));
    // Tip: Find more about JS/TS SDKs at https://docs.kontent.ai/javascript import { ContentItem, DeliveryClient } from '@kentico/kontent-delivery'; const deliveryClient = new DeliveryClient({ projectId: '975bf280-fd91-488c-994c-2f04416e5ee3', }); deliveryClient.items<ContentItem>() .languageParameter('es-ES') .equalsFilter('system.language', 'es-ES') .toObservable() .subscribe(response => console.log(response.items));

    What's next?

    In this article, you learned how you can handle URLs in multilingual apps and two ways of retrieving translated content. If you know the content item's codename, you can request it directly and specify a language. When you need to request an item by its localized URL slug, use filters to get the item you need.