Locale
Last updated: June 22, 2026
A Locale is a language setting that a Space supports. Each Locale has a language code (code, e.g. ko-KR, en-US), and field values of Content or Media are stored separately per Locale. You keep the Korean value and the English value side by side in the same field, and when reading you pick out the value in the language you want.
This page covers the CMA (Content Management API) management operations for creating and editing a Locale. Delivering the list of published Locales read-only to visitors is the responsibility of CDA Locale.
Resource structure
The following is one default Locale from the demo Space ("English (United States)"). Along with sys (system properties), it has optional, the Locale's body property.
{
"sys": {
"id": "3trmXRM3RqbgSnifyg7PAlm5PVgE8o",
"type": "Locale",
"space": { "sys": { "id": "tcq4V2Xb", "type": "Refer", "targetType": "Space" } },
"name": "English (United States)",
"default": true,
"code": "en-US",
"createdBy": { "sys": { "id": "3p4tcFbQRwz503VXdtHXNI5dZH5TVB", "type": "Refer", "targetType": "User" } },
"createdAt": "2026-06-17T16:21:10.310Z",
"updatedAt": "2026-06-17T16:21:10.310Z",
"updatedBy": { "sys": { "id": "3p4tcFbQRwz503VXdtHXNI5dZH5TVB", "type": "Refer", "targetType": "User" } },
"version": 1
},
"optional": false
}Key properties:
code: The language code of this Locale (e.g.en-US). You put this value into thelocaleparameter when reading Content or Media to receive that language's value. It is specified on create and cannot be changed afterward.default: Whether this Locale is the Space's default Locale. A Space has one default Locale, anddefaultistrueonly on that Locale.optional: Whether you may leave this Locale empty when filling arequiredfield. The example above isfalse, so it cannot be left empty.fallbackCode: Thecodeof another Locale to look up instead when a value is missing (optional). It appears in the response only when it is set. It is not set in the example above, so the key is not shown.
System properties (sys) and body
space, createdBy, and updatedBy come in the Refer shape ({ "sys": { "id", "type": "Refer", "targetType" } }).
| Property | Type | Description |
|---|---|---|
id | string | Unique resource identifier. |
type | string | Resource kind. For a Locale this is always "Locale". |
space | Refer<Space> | The Space this Locale belongs to. |
name | string | Human-readable name (e.g. "English (United States)"). It is generated automatically from code. |
default | boolean | Whether it is the Space's default Locale. Only one in a Space is true. |
code | string | Language code (e.g. ko-KR). Becomes the locale value when reading Content or Media. |
createdBy | Refer<User> | The user who created it. |
createdAt | string (date-time) | Creation time. |
updatedBy | Refer<User> | The user who last updated it. |
updatedAt | string (date-time) | Last update time. |
version | integer | The current version. It increases by 1 each time the resource is updated. |
Body properties:
| Property | Type | Description |
|---|---|---|
optional | boolean | Whether you may leave this Locale empty when filling a required field. The default Locale is usually false (must be filled). |
fallbackCode | string | The code of the Locale to look up instead when a value is missing (optional, chainable). If it is not set, the key itself is absent from the response. |
name is derived automatically from code (e.g. ja-JP → "Japanese (Japan)"). For that reason you do not include name in the create or update body.
A Locale is a settings resource with no publishing concept. So unlike Content and Media, its sys has no publish, archive, or status, only version. The version increases each time you update the Locale.
Default Locale, optional, and fallback
These three properties each determine the following.
default: Whether this Locale is the Space's default Locale. A Space has only one default, anddefaultistrueonly on that Locale. You cannot specifydefaultwhen creating (a newly created Locale is not the default). To change the default, setdefaulttotruein an update (PUT). That Locale then becomes the new default, and the previous default is unset.optional: Whether you may leave this Locale empty when filling arequiredfield. Ifoptionalisfalse, that language's value must be filled; iftrue, it may be left empty.fallbackCode: Thecodeof another Locale to look up instead when a value is missing. If the requested Locale has no value, the lookup moves to the Locale thatfallbackCodepoints to. If that Locale also has afallbackCode, the chain continues. If it is not set, the key itself is absent from the response.
The detailed behavior of the default Locale, required-fill, and fallback is covered in Localization (concept).
API
The base URL for all endpoints below is https://cma.weegloo.com/v1, and a Bearer token that authenticates against CMA is required in the Authorization header. Update and partial update must also send the X-Weegloo-Version header (the current resource's sys.version) for optimistic concurrency control. Create and delete do not have this header.
Related documents
- CDA Locale: Delivering the list of published Locales to visitors (read).
- Localization (concept): The default Locale,
optional, andfallbackCoderules. - Content: The body data that stores field values per Locale.
