# Create or update a localization

Canonical page: https://docs.ovok.com/api/localization-keys/create-or-update-a-localization

`PUT /localization/{language}/{key}`

Sets the value of one key in one language. Creates the localization if it does not exist yet.

**Auth:** bearer token.
**Scope:** the caller's project (from the token). Localizations are read and written with your token.

## Behaviour

- `language` must be one of the languages in your project's locale settings (`GET /locales`).
- `key` is a dot-separated path such as `home.screen.title`. It may contain letters, digits, `_`, `-` and `.`, and must not start with `.`.
- Ovok sets `author` to your profile. If more than one entry exists for this key and language, the first is kept and the others are deleted.
- After the write, a background job runs for every project language. It creates an AI translation of the default-language value for each language that has no entry for this key yet. Existing translations are not changed.

## Example

```bash
curl -X PUT 'https://api.sandbox.ovok.com/localization/en-US/home.screen.title' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \
  -H 'Content-Type: application/json' \
  -d '{ "value": "Home" }'
```
