---
title: Explore languages in Xperience
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

> **Note:** This guide focuses only on channels with the [language prefix URL format](https://docs.kentico.com/documentation/developers-and-admins/configuration/languages.md#content-languages-and-channel-url-formats).

Offering your website content in multiple languages is an important step in reaching a broader audience. To provide a better and more inclusive user experience for your visitors, Xperience by Kentico supports localization and language variants.

Preparing different language versions of your content is a task for the editors. However, development effort is required to properly set up different language support in your website.

> **Info:** **Multilingual content series**
>
> **This is the first part of the [Set up multilingual](https://docs.kentico.com/guides/development/multilingual.md) mini-series.** Using a simple concrete example, the mini-series demonstrates best practices and necessary steps you need to perform in order to present your website content in multiple languages in a user-friendly way.
>
> In this section, you will learn:
>
> - the basic terminology related to multilingual support in Xperience by Kentico.
> - how to display your home page and cookie consents in two language versions: English and Spanish.
>
> ![Screen recording of the Training guides home page at localhost:53415, showing the English heading 'Welcome to Training guides!' and the text 'Hello world!'. Adding /es to the URL switches the page content to Spanish.](https://docs.kentico.com/docsassets/modules/explore-languages-in-xperience/Switch-language-manual.gif "screen recording gif that demonstrates language switching by URL")

> **Tip:** This section focuses on the **developer tasks** of the process, but it also references actions editors will typically take. Feel free to follow those steps as well to see and enjoy the fruits of your effort at the end. 🙂

## Prerequisites

To follow along, you should have the following:

- a running instance of **Xperience by Kentico version 30.11.1 or higher** (for guidance, follow [Install a specific version of Xperience by Kentico](https://docs.kentico.com/guides/development/get-started/install-a-specific-version-of-xperience-by-kentico.md))
- **a website channel** set up with at least one **page displaying a content item** stored in the _Content hub_ (for guidance, follow [our Kickstart series](https://docs.kentico.com/guides/development/developer-kickstart/xperience-by-kentico-overview.md))

> **Tip:** The main branch of [this repository](https://github.com/Kentico/xperience-by-kentico-training-guides) is a good starting point that has all of the above set up. You will find the instructions to run in the README file.

Additionally, we assume you have followed [Create a cookie preferences widget guide](https://docs.kentico.com/guides/development/data-protection/create-a-cookie-preferences-widget.md) and [Build a tracking consent banner guide](https://docs.kentico.com/guides/development/data-protection/build-a-tracking-consent-banner.md) (or implemented your own cookies widget and tracking consent banner in a similar way). The widget and tracking consent banner you will be working with should look like this:

![Cookie policy page of the Training guides site in English. A tracking consent banner at the top lists how the site uses analytical, marketing, and preference cookies next to an Accept all cookies button and a Configure cookies link. Below it, the cookie preferences widget shows Essential, Preference, Analytical, and Marketing cookies with descriptions and a Submit button.](https://docs.kentico.com/docsassets/modules/explore-languages-in-xperience/cookies-consents.png "screenshot of cookie consent page")

> **Tip:** If you prefer to see the finished implementation of multilingual right away, take a look at the [finished branch of our repository](https://github.com/Kentico/xperience-by-kentico-training-guides/tree/finished). It contains both the cookie widget and tracking consent banner.

## Understand languages in Xperience by Kentico

Before diving in, let's get familiar with the basic concepts of working with [languages in Xperience by Kentico](https://docs.kentico.com/documentation/developers-and-admins/configuration/languages.md).

Languages are defined in the administration interface using the **Languages** application.

When more than one language is defined, [editors can create \*\*multiple language variants\*\*](https://docs.kentico.com/documentation/business-users/content-hub/content-items.md#translate-content-items) of [website channel pages](https://docs.kentico.com/documentation/business-users/website-content.md), [content items](https://docs.kentico.com/documentation/business-users/content-hub.md), and [consent texts](https://docs.kentico.com/documentation/developers-and-admins/data-protection/consent-management.md#create-consents) (one variant per language).

One language must always be set as the [\*\*Default language\*\*](https://docs.kentico.com/documentation/developers-and-admins/configuration/languages.md#set-up-a-new-language).

![List of languages in the Languages application with two languages: English, marked with a Default badge, with code name en and formatting culture en-US, and Español with code name es, formatting culture es-ES, and English as its fallback language.](https://docs.kentico.com/docsassets/modules/explore-languages-in-xperience/default-language.png "Default language in Xperience by Kentico")

For example, if the **Default language** is English, any content items editors create are, by default, English language variants. Editors can create a different language variant by [manually picking a different language](https://docs.kentico.com/documentation/business-users/content-hub/content-items.md).

> **Info:** [A fresh install of Xperience by Kentico boilerplate project](https://docs.kentico.com/guides/development/get-started/install-a-specific-version-of-xperience-by-kentico.md) comes with English preset as the **Default language**.

Each language can be assigned a [\*\*Fallback language\*\*](https://docs.kentico.com/documentation/developers-and-admins/configuration/languages.md#language-fallbacks). If you set up a fallback language and try to retrieve content in a language it is not translated into, the content will come back in the fallback language instead.

Every [website channel](https://docs.kentico.com/documentation/developers-and-admins/configuration/website-channel-management.md) that uses the [language prefix URL format](https://docs.kentico.com/documentation/developers-and-admins/configuration/languages.md#content-languages-and-channel-url-formats) has a **Primary language** (typically assigned at the time of channel creation). Channels that use language-specific domains have no **Primary language**. This is a "default" language for the channel. When a visitor navigates to your website without specifying the language code in the URL (e.g., _baseURL/page_), they will see the page content in the **Primary language**. Navigating to _baseURL/\<language\_code\_name>/page_ will return the page content in a specific language. We talk more about [multilingual URLs](https://docs.kentico.com/documentation/developers-and-admins/development/routing/content-tree-based-routing.md#multilingual-urls) in [the next part of this mini-series](https://docs.kentico.com/modules/multilingual/handle-multilingual-urls.md).

> **Note:** **Multilingual in multichannel setup**
>
> Languages are global and exist above website channels. **All website channels are automatically available in all defined languages**. At this time, there is no way (out of the box) to configure a channel to be available only in a subset of languages.
>
> This means that you can end up in a situation where visitors are able to retrieve your website pages in a language they are not (and are not meant to be) translated into.
>
> _For example, you have three languages defined in your solution: English, Spanish (with a fallback to English), and French (with a fallback to English). Your instance of Xperience contains two website channels, each translated into two language versions:_
>
> 1. _Channel A in English and Spanish_
> 2. _Channel B in English and French_
>
> _Even though by design, pages of Channel A are not supposed to be available in French, when you request https://channelA/fr, the system will still return [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) because French exists globally and falls back to English, in which the pages are published (content will come back in the fallback language, English). If French had no fallback language, the request would return [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found)._
>
> See [Language fallbacks in routing](https://docs.kentico.com/documentation/developers-and-admins/development/routing/content-tree-based-routing.md#language-fallbacks-in-routing) for details.
>
> This is a behavior to be mindful of when you work with multichannel and multilingual solutions. The best way of handling it will depend on your implementation, needs, and preferences, and is out of the scope of this guide.

> **Tip:** **Editor's task (optional): Add a Spanish language with a fallback to English**
>
> Sign in to the administration interface to experience the theory in practice. If you have been working off the main branch of our Training guides repository, the only language in your Xperience instance is English at the moment.
>
> 1. [Follow the documentation](https://docs.kentico.com/documentation/developers-and-admins/configuration/languages.md#set-up-a-new-language) to create a new language. Set its **Language name** to **Español** and its **Code name** to **es**. Do **not** set the **Fallback language** yet.
> 2. Try to navigate to different pages of your website, adding the code _/es_ to the base URL (e.g., _http://localhost:53415/es_ or _http://localhost:53415/es/cookie-policy_). The system will return a [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) error each time because there is no Spanish version of your content to display.
> 3. Now, go back to the **Languages** application in the administration interface and set the **Fallback language** of **Español** to **English**. Notice that you can now see your pages, and the content comes back in the fallback language – English.
>
> To do the same through the [Management MCP server](https://docs.kentico.com/documentation/developers-and-admins/api/management-api.md), call `create_language` with the code name `es`, the display name `Español`, a culture format such as `es-ES`, not as the default language and without a fallback language. Request `http://localhost:53415/es` and check that the response status is 404. Then get the ID of English with `list_languages`, set it as the fallback language of Spanish with `update_language`, and request the URL again. The response status is now 200, and the content is in English.
