> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://contentful.com/developers/docs/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://contentful.com/_mcp/server. Locales allow you to define translatable content for assets and entries. A locale includes the following properties: * `name`: A human readable identifier for a locale. For example, 'British English'. * `code`: An identifier used to differentiate translated content in API responses. For example, 'en-GB'. * `fallbackCode`: The code of the locale to use if there is no translated content for the requested locale. For example, `en-US`. You can set it to `null` if you don't want a default locale. This can only be set via the API, and not with the web app or client libraries. ## Locale collection [Get all locales of a space](/references/content-management-api/locales/get-all-locales-of-a-space) The locales endpoint returns a list of all created locales. One will have the flag `default` set to true and is the locale used in the CDA, and you specified no other locale in the request. [Create a locale](/references/content-management-api/locales/create-a-locale) Use this endpoint to create a new locale for the specified space. You cannot create two locales with the same locale code. ## Locale [Get a locale](/references/content-management-api/locales/get-a-locale) This endpoint returns a single locale and its metadata. [Update a locale](/references/content-management-api/locales/update-a-locale) Use this endpoint to update existing locales in the specified space. > **Info** > > Changing the `code` of a locale changes the responses for upcoming requests, which might break your existing code. Changes to the `code` property of locales used as a fallback are not allowed. You have to first ensure that the locale is not used as a fallback by any other locale before changing its `code`. A space's default locale is permanent. This means you cannot change a locale's `default` property. > **Info** > > When updating a locale, you need to specify the last version of the locale you are updating with `X-Contentful-Version`. [Deleting a locale](/references/content-management-api/locales/delete-a-locale) This endpoint deletes an existing locale. It's **not** possible to recover from this action, all content associated with this specific locale will be deleted and cannot be recreated by creating the same locale again. Deleting a locale used as a fallback is not allowed. You first have to ensure that a locale is not used as a fallback before being able to delete it. ## API Docs - Locales [Get all locales of a space](https://contentful.com/developers/docs/references/content-management-api/locales/get-all-locales-of-a-space.md) - Locales [Create a locale](https://contentful.com/developers/docs/references/content-management-api/locales/create-a-locale.md) - Locales [Get a locale](https://contentful.com/developers/docs/references/content-management-api/locales/get-a-locale.md) - Locales [Update a locale](https://contentful.com/developers/docs/references/content-management-api/locales/update-a-locale.md) - Locales [Delete a locale](https://contentful.com/developers/docs/references/content-management-api/locales/delete-a-locale.md) ## OpenAPI Specification The raw OpenAPI 3.1 specification for this API is available at: - [OpenAPI JSON](https://contentful.com/developers/docs/openapi.json) - [OpenAPI YAML](https://contentful.com/developers/docs/openapi.yaml)