Skip to main content

LOCALE API Reference

Module Information

Service Files:

  • Private: service/private/locale.js
  • Public: service/locale.js

Available Services: 9 Documented Services: 9


locale.add

Add a new internationalisation key with translations for all supported languages. The key_code is normalised before insertion: server category keys are lowercased and prefixed with underscore if missing, all other category keys are uppercased. Inserts one row per supported language via stored procedure intl_add_next, then returns the full newly created entry.

PropertyValue
Scopeplateform
PermissionWrite (4)

Endpoint:

https://hostname/-/svc/locale.add

Parameters

ParameterTypeRequiredDefaultDescription
valuesobjectYes--
categorystringYes--

Returns

FieldTypeDescription
typeany-
descriptionany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
MISSING_VALUES-values parameter is required but was not provided
MISSING_CATEGORY-category parameter is required but was not provided
INTERNAL_ERROR-Failed to insert locale entries via stored procedure intl_add_next

locale.build

Rebuild all locale JSON files on the filesystem from the database. Iterates over all application types (ui, server, transfer, electron-web, electron-main, liceman, sandbox) and all supported languages, calling stored procedure get_locale_next for each combination, then writes the result to static_dir/locale/TYPE/LANG.json. Also writes the file format registry to static_dir/dataset/files-formats.json. This operation overwrites existing locale files.

PropertyValue
Scopeplateform
Permissionmodify

Endpoint:

https://hostname/-/svc/locale.build

Parameters

No parameters

Returns

FieldTypeDescription
typeany-
descriptionany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
INTERNAL_ERROR-Failed to fetch locale data or write locale files to filesystem

locale.delete

Delete an internationalisation key and all its language entries from the database. Calls stored procedure intl_delete_next with the key and type. Returns the deleted key code.

PropertyValue
Scopeplateform
Permissionmodify

Endpoint:

https://hostname/-/svc/locale.delete

Parameters

ParameterTypeRequiredDefaultDescription
keystringYes--
typestringNo"ui"-

Returns

FieldTypeDescription
typeany-
descriptionany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
MISSING_KEY-key parameter is required but was not provided
INTERNAL_ERROR-Failed to delete locale entry via stored procedure intl_delete_next

locale.keys

List available internationalisation key codes matching an optional filter string and category. Calls stored procedure intl_keys_next. Returns a flat list of matching key records.

PropertyValue
Scopeplateform
PermissionWrite (4)

Endpoint:

https://hostname/-/svc/locale.keys

Parameters

ParameterTypeRequiredDefaultDescription
keystringNo""-
categorystringNo"ui"-

Returns

FieldTypeDescription
typeany-
descriptionany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
INTERNAL_ERROR-Failed to query locale keys via stored procedure intl_keys_next

locale.get

Retrieve a single internationalisation entry by key code and type. Calls stored procedure intl_get_next. The type parameter falls back to the category parameter if type is not provided.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/locale.get

Parameters

ParameterTypeRequiredDefaultDescription
keystringNo""-
typestringNo"ui"-
categorystringNo"ui"-

Returns

FieldTypeDescription
typeany-
descriptionany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
INTERNAL_ERROR-Failed to query locale entry via stored procedure intl_get_next

locale.group

Retrieve all internationalisation entries belonging to a named group. Calls stored procedure intl_get_by_group using a synchronous callback pattern. Returns grouped locale data for the specified group name.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/locale.group

Parameters

ParameterTypeRequiredDefaultDescription
namestringYes--

Returns

FieldTypeDescription
typeany-
descriptionany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
MISSING_NAME-name parameter is required but was not provided
INTERNAL_ERROR-Failed to query locale group via stored procedure intl_get_by_group

locale.list

List internationalisation entries for a given category with pagination. Calls stored procedure intl_list_next and groups results by key_code so each returned object contains all language translations for that key.

PropertyValue
Scopeplateform
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/locale.list

Parameters

ParameterTypeRequiredDefaultDescription
pageintegerNo1-
categorystringNo"ui"-

Returns

FieldTypeDescription
typeany-
descriptionany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
INTERNAL_ERROR-Failed to query locale list via stored procedure intl_list_next

locale.search

Search internationalisation entries by value string and category with pagination. Calls stored procedure intl_search_next and groups results by key_code, returning one object per matching key containing all language translations.

PropertyValue
ScopeHub (requires hub context)
PermissionAnonymous (0)

Endpoint:

https://hostname/-/svc/locale.search

Parameters

ParameterTypeRequiredDefaultDescription
valuestringNo""-
categorystringNo"ui"-
pageintegerNo1-

Returns

FieldTypeDescription
typeany-
descriptionany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
INTERNAL_ERROR-Failed to query locale search via stored procedure intl_search_next

locale.update

Update an internationalisation entry value. When id is provided, updates the entry directly by ID via stored procedure intl_update_by_id_next. When id is not provided, first creates the entry via intl_add_next using category, lang, and code, then updates it. Returns the entry context with previous, current, and next sibling records for navigation.

PropertyValue
Scopeplateform
Permissionmodify

Endpoint:

https://hostname/-/svc/locale.update

Parameters

ParameterTypeRequiredDefaultDescription
valuestringYes--
idstringNo--
categorystringNo--
langstringNo--
codestringNo--

Returns

FieldTypeDescription
typeany-
descriptionany-
propertiesany-

Possible Errors

Error CodeHTTP StatusDescription
MISSING_VALUE-value parameter is required but was not provided
MISSING_CATEGORY-category is required when id is not provided
MISSING_LANG-lang is required when id is not provided
MISSING_CODE-code is required when id is not provided
INTERNAL_ERROR-Failed to update locale entry via stored procedure intl_update_by_id_next

  • ACL System - Permission model
  • Service Routing - URL patterns
  • Error Handling - Error codes