---
title: "Locales"
slug: "locales"
abstract: "Methods to retrieve, create, or update locales to help define the user language and region."
---
# Locales

A locale is a culture code that consists of a two-letter language code and a two-letter region code, for example, the locale for American English is *en-US* and for British English is *en-GB*. To create a [localized copy](https://doc.sitecore.com/ch-one/en/users/content-hub-one/localize-content.html) of a content item, an *Administrator* must have already defined the locales. You can add, edit, or delete a locale using either the API or the [Content Hub ONE app](https://doc.sitecore.com/ch-one/en/developers/content-hub-one/content-management-api/manage-locales-using-the-app.md "Manage locales using the app") if you have the necessary permissions. And, when required, you can [retrieve or update the default locale](https://doc.sitecore.com/ch-one/en/developers/content-hub-one/content-management-api/tenant-specific-settings.md "Tenant-specific settings").

> [!note]
> The [base URL](https://doc.sitecore.com/ch-one/en/developers/content-hub-one/content-management-api/content-management-api.html "Content Management API") when working with locales is `https://content-api.sitecorecloud.io/`. For guidance on API syntax, see [Syntax](https://doc.sitecore.com/ch-one/en/developers/content-hub-one/content-management-api/syntax.html "Syntax").

## Get all locales

Use this method to retrieve a list of locales. If you don't specify any [filtering parameters](https://doc.sitecore.com/ch-one/en/developers/content-hub-one/content-management-api/search-and-filter-parameters.html#UUID-01d7a72f-def1-375d-906f-3ef71fdb5351_title-idm273423993491036), you will retrieve all available locales.

```curl
curl --location --request GET '<BASE_URL>/api/content/v1/locales' \
--header 'Accept: text/plain' \
--header 'Authorization: <BEARER_TOKEN>'
```

```json
{
    "totalCount": 6,
    "data": [
        {
            "id": "es-GT",
            "name": "Spanish (Guatemala)"
        },
        {
            "id": "nl-BE",
            "name": "Dutch (Belgium)"
        },
        {
            "id": "fr-CA",
            "name": "French (Canada)"
        },
        {
            "id": "en-US",
            "name": "English (United States)"
        },
        {
            "id": "sv-SE",
            "name": "Swedish (Sweden)"
        },
        {
            "id": "es-ES",
            "name": "Spanish (Spain)"
        }
    ]
}
```

## Get a locale using the ID

Use this method to retrieve a locale with a specific ID. For a list of all available IDs, run the `GET api/content/v1/locales` method. To view a specific locale ID, [open the relevant locales details page](https://doc.sitecore.com/ch-one/en/developers/content-hub-one/content-management-api/manage-locales-using-the-app.md "Manage locales using the app"). This request returns a locale with the ID *sv-SE*.

```curl
curl --location --request GET '<BASE_URL>/api/content/v1/locales/sv-SE' \
--header 'Authorization: <BEARER_TOKEN>'
```

```json
{
    "id": "sv-SE",
    "name": "Swedish (Sweden)"
}
```

## Create a locale

Use this method to create a locale. This request creates a locale called *es-CL* for Spanish (Chile) and sets it as the default locale.

```curl
curl --location --request POST '<BASE_URL>/api/content/v1/locale' \
--header 'Content-Type: application/json' \
--header 'Authorization: <BEARER_TOKEN>' \
--data '{
    "id": "es-CL",
    "name": "Spanish (Chile)",
    "default": true
}'
```

```json
{
    "id": "es-CL",
    "name": "Spanish (Chile)",
    "default": true
}
```

## Update a locale

Use this method to update a locale. In this example, the name of the locale is being changed from *French (France)* to *French (fr-FR)* and the locale is no longer the default.

```curl
curl --location --request PUT '<BASE_URL>/api/content/v1/locales/fr-FR' \
--header 'Content-Type: application/json' \
--header 'Authorization: <BEARER_TOKEN>' \
--data '{
    "name": "French (fr-FR)",
    "default":false
}'
```

```json
{
    "id": "fr-FR",
    "name": "French (fr-FR)"
}
```

## Delete a locale

Use this method to delete a locale with a specific ID. You cannot delete a locale if it is being used by a content item or if it is the default locale. This request deletes a locale with the ID *nl-NL*.

```curl
curl --location --request DELETE '<BASE_URL>/api/content/v1/locales/nl-NL' \
--header 'Authorization: <BEARER_TOKEN>'
```

## Get supported locales

Use this method to retrieve a list of [supported locales](https://doc.sitecore.com/ch-one/en/developers/content-hub-one/content-management-api/locales/supported-locales.html "Supported locales"). If you don't specify any [filtering parameters](https://doc.sitecore.com/ch-one/en/developers/content-hub-one/content-management-api/search-and-filter-parameters.html#UUID-01d7a72f-def1-375d-906f-3ef71fdb5351_title-idm273423993491036), you will retrieve all supported locales.

```curl
curl --location --request GET '<BASE_URL>/api/content/v1/locales/supported' \
--header 'Accept: text/plain' \
--header 'Authorization: <BEARER_TOKEN>'
```