---
title: "Update a locale"
method: PATCH
path: "/projects/{project_id}/locales/{id}"
tags: ["Locales"]
---

# Update a locale

`PATCH /projects/{project_id}/locales/{id}`

Update an existing locale.

## Path parameters

- `project_id` string, required
- `id` string, required

## Headers

- `X-PhraseApp-OTP` string

## Request body

- object
  - `branch` string — specify the branch to use
  - `name` string — Locale name
  - `code` string — Locale ISO code
  - `default` boolean — Indicates whether locale is the default locale. If set to true, the previous default locale the project is no longer the default locale.
  - `main` boolean — Indicates whether locale is a main locale. Main locales are part of the [Verification System](https://support.phrase.com/hc/en-us/articles/5784094755484) feature.
  - `rtl` boolean — Indicates whether locale is a RTL (Right-to-Left) locale.
  - `source_locale_id` string — Source locale. Can be the name or id of the locale. Preferred is id.
  - `fallback_locale_id` string — Fallback locale for empty translations. Can be a locale name or id.
  - `unverify_new_translations` boolean — Indicates that new translations for this locale should be marked as unverified. Part of the [Advanced Workflows](https://support.phrase.com/hc/en-us/articles/5784094755484) feature.
  - `unverify_updated_translations` boolean — Indicates that updated translations for this locale should be marked as unverified. Part of the [Advanced Workflows](https://support.phrase.com/hc/en-us/articles/5784094755484) feature.
  - `autotranslate` boolean — If set, translations for this locale will be fetched automatically, right after creation.
  - `language_ai_profile` string — Identifier of the Language AI profile to use for this locale.

## Response `200`

OK

- LocaleDetails
  - `id` string
  - `name` string
  - `code` string
  - `default` boolean
  - `main` boolean
  - `rtl` boolean
  - `plural_forms` string[]
  - `ordinal_plural_forms` string[]
  - `source_locale` LocalePreview
    - `id` string
    - `name` string
    - `code` string
  - `fallback_locale` LocalePreview
    - `id` string
    - `name` string
    - `code` string
  - `language_ai_profile` string
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `statistics` LocaleStatistics
    - `keys_total_count` integer
    - `keys_untranslated_count` integer
    - `words_total_count` integer
    - `translations_completed_count` integer
    - `translations_unverified_count` integer
    - `unverified_words_count` integer
    - `missing_words_count` integer

## Other responses

- `400` — Bad request. The request could not be parsed or a parameter failed validation. Verify the request body, the content type, and the parameter types, then retry.
- `401` — Unauthorized. Authentication failed because the access token is missing, expired, or invalid. Supply a valid access token and retry.
- `403` — Forbidden. The credentials are valid but not permitted for this request: the access token may lack the required scope, the user may lack permission on the resource, or the account plan may not include the feature. Use a token with the required scope on an account and user that hold the necessary permissions.
- `404` — Not found. The requested resource does not exist or is not visible to the authenticated user. Verify the identifiers in the request path and that the token has access to them, then retry.
- `422` — Unprocessable entity. The request was well-formed but failed validation. The response body lists each offending field in the `errors` array, with its resource, field, and a human-readable message. Correct the listed fields and retry.
- `429` — Too many requests. The rate limit has been exceeded. Wait until the time indicated by the `X-Rate-Limit-Reset` response header before retrying.

---

[API](https://skmtc.net/phrase/apis/control-hub-service.md) · [All operations](https://skmtc.net/phrase/apis/control-hub-service/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/phrase/control-hub-service/revisions/98ecac7ba2bf/schema)
