# Set project locales

Canonical page: https://docs.ovok.com/api/localization/set-project-locales

`PATCH /locales`

Sets the languages enabled for your project and its default language. Creates the locale settings if the project has none.

**Auth:** bearer token. You need `List:create`, `List:read`, `List:update`, `List:delete` and `List:search` access, or be a project admin.
**Scope:** the caller's project (from the token).

## Behaviour

- The body replaces the whole setting. `languages` needs at least one language, and `defaultLanguage` must be one of them.
- For each language that is new compared with the previous setting, background jobs create AI translations of all localization keys and content items from the previous default language. Existing translations are not changed.
- Removing a language does not delete its localizations or content.
- Changing `defaultLanguage` does not move or translate anything by itself.

## Example

```bash
curl -X PATCH 'https://api.sandbox.ovok.com/locales' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \
  -H 'Content-Type: application/json' \
  -d '{ "languages": ["en-US", "de-DE", "fr-FR"], "defaultLanguage": "en-US" }'
```
