Locales and translations¶
Locales are managed at /api/v3/locales/ and are exposed for authenticated requests only, with no anonymous access. See v3 API authentication for how tokens map to permissions.
Locales are exposed as CRUD:
GET /locales/: list locales.GET /locales/{locale_id}/: return one locale.POST /locales/: create a locale.PUT /locales/{locale_id}/: update a locale.DELETE /locales/{locale_id}/: delete a locale.
A locale response includes its id, language_code, display_name, is_bidi (bidirectional text), and is_default state. The request input is a single language_code value:
curl -X POST "https://example.com/api/v3/locales/" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"language_code": "fr"}'
Validation rejects duplicate or unsupported language codes, and prevents deleting the final locale or a locale that is still used by pages or other objects.
Translation support¶
Beyond managing locales themselves, the v3 API supports translation workflows over the API:
Pages support
localeandtranslation_offilters, and thecopy_for_translationpage action, with optional parent, subtree, and alias behaviour.Snippets on a
TranslatableMixinmodel supportlocaleandtranslation_offilters and acopy_for_translationaction.
Locales API reference¶
We document the full generated OpenAPI reference for every locale endpoint from Wagtail’s own OpenAPI snapshot, see v3 API reference.