Translations (i18n)

Translation tools maintain the i18n models of Text and Translation. An i18n model holds texts and their translations. A model is either global or belongs to an application. Every application has its own model. A model can enhance a base model.

The translation tools are available from Neptune DXP - Open Edition 25.0.1.

Required access: the I18n Text & Translation tool (i18n) in one of your roles. Display access is enough to list and read models, languages, and text types. Saving and deleting require Edit access.

If none of your roles includes this tool with the required access, the tool fails immediately with an access denied error. Contact an administrator to request access, or see Access control for more information on how access is enforced.

Texts and translations

save_i18n_model replaces all stored texts of a model with the texts in attributes. Always send all texts of the model, not only the texts that change.

A translation is a locale key on a text, for example:

{ "name": "save", "text": "Save", "de": { "text": "Speichern" } }

Translations that you leave out of a stored text are kept. To clear a translation, send { "text": "" } for its locale.

A child text is named parent.child and sets parent to the name of its parent text.

To change the texts of an application, update its existing model. Do not create a second model for the application. The application of a model and the name of an application model cannot be changed.

Available tools

Tool Description

list_i18n_models

List i18n models. Supports filtering, field selection, and sorting through listOptions. To read whereUsed, baseModel, and enhancedBy, use get_i18n_model.

get_i18n_model

Return an i18n model by its ID, by name, or by application. A name matches a global model first, then the model of the application with that name. If a global model has the same name as an application, use the application to get the model of the application.

save_i18n_model

Create or update an i18n model. Omit id to create a new model. attributes replaces the stored texts. See Texts and translations.

delete_i18n_model

Delete an i18n model by its ID. The deletion is refused for the model of an application, for a model in use, and for a model with enhancements. An enhancement can always be deleted.

list_i18n_languages

List the languages that can be added as locales of an i18n model.

list_i18n_attribute_types

List the text types available for the type field of an i18n text.

Was this page helpful?

What made the biggest difference for you?
What went wrong? (Your feedback helps us fix it.)

Please don't include personal or sensitive data.