Internationalization (i18n) API
API to manage internationalization (i18n) translations organized by language, namespace, and key.
Download the OpenAPI definition (YAML)
Security schemes
OAuth2: oauth2
authorizationCode flow, token URL https://localhost:8090/oauth2/token, authorization URL https://localhost:8090/oauth2/authorize
1 scopes
| Scope | Description |
|---|---|
system | Access to system management APIs |
clientCredentials flow, token URL https://localhost:8090/oauth2/token
1 scopes
| Scope | Description |
|---|---|
system | Access to system management APIs |
Languages
List supported languages
List all languages
GET /i18n/languages
Returns a list of all language tags that have translations in the system.
Responses
| Code | Description | Schema |
|---|---|---|
200 | List of language tags | LanguageListResponse |
500 | Internal server error | Error |
resolve
Resolve translations (runtime)
Resolve all translations for a language
GET /i18n/languages/{language}/translations/resolve
Resolves all translations for a language by merging custom and default values; returns 200 even when only defaults exist (404 only if neither custom nor default exists for the requested scope).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
language | path | string | Yes | Language tag in canonical BCP 47 format (e.g., |
namespace | query | string | Filter translations by namespace. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Translations resolved | LanguageTranslationsResponse |
400 | Bad request | Error |
500 | Internal server error | Error |
Resolve a single translation
GET /i18n/languages/{language}/translations/ns/{namespace}/keys/{key}/resolve
Resolves the final value for a translation by merging custom and default values; returns 200 even when only a default exists (404 only if neither custom nor default exists).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
language | path | string | Yes | Language tag in canonical BCP 47 format (e.g., |
namespace | path | string | Yes | Namespace for grouping translations (e.g., |
key | path | string | Yes | Translation key within the namespace (e.g., |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Translation resolved | TranslationResponse |
400 | Bad request | Error |
404 | Translation not found | Error |
500 | Internal server error | Error |
management
Manage translations (admin)
Set translations for a language
POST /i18n/languages/{language}/translations
Replaces all custom translations for the language with the provided values.
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
language | path | string | Yes | Language tag in canonical BCP 47 format (e.g., |
Request body (required): application/json
Schema: SetTranslationsRequest
1 property
| Name | Type | Required | Description |
|---|---|---|---|
translations | object | Yes | Translations organized by namespace. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Custom translations set | LanguageTranslationsResponse |
400 | Bad request | Error |
500 | Internal server error | Error |
Clear all translations for a language
DEL /i18n/languages/{language}/translations
Removes all custom translations for the language.
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
language | path | string | Yes | Language tag in canonical BCP 47 format (e.g., |
Responses
| Code | Description | Schema |
|---|---|---|
204 | Custom translations cleared | |
400 | Bad request | Error |
500 | Internal server error | Error |
Set a single translation
POST /i18n/languages/{language}/translations/ns/{namespace}/keys/{key}
Creates or updates a custom translation for the specified language, namespace, and key.
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
language | path | string | Yes | Language tag in canonical BCP 47 format (e.g., |
namespace | path | string | Yes | Namespace for grouping translations (e.g., |
key | path | string | Yes | Translation key within the namespace (e.g., |
Request body (required): application/json
Schema: SetTranslationRequest
1 property
| Name | Type | Required | Description |
|---|---|---|---|
value | string | Yes | Translation value. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Translation set | TranslationResponse |
400 | Bad request | Error |
500 | Internal server error | Error |
Clear a single translation
DEL /i18n/languages/{language}/translations/ns/{namespace}/keys/{key}
Removes the custom translation for the specified language, namespace, and key.
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
language | path | string | Yes | Language tag in canonical BCP 47 format (e.g., |
namespace | path | string | Yes | Namespace for grouping translations (e.g., |
key | path | string | Yes | Translation key within the namespace (e.g., |
Responses
| Code | Description | Schema |
|---|---|---|
204 | Custom translation cleared | |
400 | Bad request | Error |
500 | Internal server error | Error |
Schemas
LanguageListResponse
Type: object
1 property
| Name | Type | Required | Description |
|---|---|---|---|
languages | array of string | List of language tags available in the system. |
TranslationResponse
Type: object
Single translation response.
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
language | string | Yes | Language tag. |
namespace | string | Yes | Namespace of the translation. |
key | string | Yes | Translation key. |
value | string | Yes | Translated value. |
SetTranslationRequest
Type: object
Request to set a single translation.
1 property
| Name | Type | Required | Description |
|---|---|---|---|
value | string | Yes | Translation value. |
LanguageTranslationsResponse
Type: object
All translations for a language, organized by namespace.
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
language | string | Yes | Language tag. |
totalResults | integer | Total number of translation keys returned. | |
translations | object | Yes | Translations organized by namespace. |
SetTranslationsRequest
Type: object
Request to set custom translations for a language.
1 property
| Name | Type | Required | Description |
|---|---|---|---|
translations | object | Yes | Translations organized by namespace. |
I18nMessage
Type: object
Internationalized message with translation key and default value.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Translation key for fetching localized message. |
defaultValue | string | Yes | Default message in English (fallback). |
Error
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Error code. Codes follow the I18N-XXXX convention. |
message | I18nMessage | Yes | Internationalized message with translation key and default value. |
description | I18nMessage | Internationalized message with translation key and default value. |
Was this page helpful?