Skip to main content
POST
Create a localization

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

projectId
string
required

Project ID

Body

application/json
code
string
required

The value matched against an end user's locale_code attribute to pick their translation, and how a version translation is addressed in the URL path. Letters, digits, - and _ only. Unique within the project, case-insensitively (delivery ignores case). Usually the locale tag, but free-form: fr-enterprise next to fr gives one language two variants.

Required string length: 2 - 35
name
string
required

The language this locale stands for, e.g. "French (France)". Machine translation is asked to translate INTO this name, so a real language name (copied from GET /v2/locales) translates better than an improvised label.

Required string length: 2 - 64
locale
string
required

The locale tag this entry stands for, e.g. fr-FR. GET /v2/locales lists the common tags with the language name to file each one under.

Required string length: 2 - 35

Response

Created localization

id
string
required
object
enum<string>
required
Available options:
localization
code
string
required

The locale's code — how version translations are addressed, and the value matched against the end user's locale_code attribute to pick a translation at delivery.

name
string
required

The language this locale stands for, e.g. "French (France)" — also what machine translation is asked to translate into.

locale
string
required

The locale tag this entry was created from, e.g. fr-FR.

isDefault
boolean
required

The source language content is authored in. It has no translation of its own — version translations exist only for the non-default locales.

deleted
boolean
required

Soft-deleted: no longer offered or delivered, but the translations it holds on every version are kept, so restoring it brings them all back.

createdAt
string<date-time>
required
updatedAt
string<date-time>
required
restored
boolean
required

true when this code belonged to a soft-deleted localization: that one was RESTORED (same id, with every translation it held) instead of a new one being created.