---
title: "Update a locale"
method: PUT
path: "/settings/locales/{id}"
tags: ["Admin Settings: Locales"]
---

# Update a locale

`PUT /settings/locales/{id}`

## Request

- Base URL: `http://localhost:8000/api/admin`
- URL: `http://localhost:8000/api/admin/settings/locales/{id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-admin-api/docs/settings/locales/:id/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates a locale. Code uniqueness excludes self.

## Path parameters

- `id` integer, required

## Request body

- object
  - `code` string
  - `name` string
  - `direction` 'ltr' | 'rtl'
  - `logo_path` string, nullable

## Response `200`

Locale updated.

## Other responses

- `400`: Invalid input
- `404`: Locale not found.
- `422`: Validation failure.

---

[API](https://skmtc.dev/bagisto/apis/bagisto-admin-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-admin-api/revisions/3198f11be70f?raw)
