Web UI

HOWTO: Translation Label Conventions

Updated: March 30, 2020

Nuxeo Web UI supports element internationalization. Every element that displays text to the user must extend the I18nBehavior, which provides the i18n method to dynamically load labels according to the current locale.

Some internationalization labels are auto-generated by the Web UI components. For example, the translation name for your document type uses label.document.type.${name}. In this case, providing the "label.document.type.mydoctype": "My Document Type" entry in messages.json for MyDocType will properly translate the value for the end user.

Adding translation can easily be done using Nuxeo Studio Designer. When doing so, you can just update/create the .json file, there is no need to add a deployment fragment or to build the hierarchy that will hold the .json translation.

Web UI uses the same language as the web browser. After adding a translation and having hot-reloaded your project, you may need to force refresh the page to force the translation files to be reloaded.

Label Conventions

Within the following examples, the ${...} notation indicates the part of the translation key that should be replaced with the name, type, or other value indicated.

For example, exportButton.${name} for the pdfRendition export would be:

{
  "exportButton.pdfRendition": "PDF Rendition"
}

Documents / Workflow

Property Description
label.document.type.${name} Friendly name for a Document type. name must be lower case.
label.ui.state.${name} Friendly name for Document state. Defaults to the state name.
diffObject.property.label.${property} Label for diff property, defaults to document property name.*,Events
activity.${event} Label for document activity with event name, also applies to audit history listing.
mimetype.${value} Friendly label for system MIME types (value is the raw MIME type - e.g., application/pdf).
tasks.${action} The task action button label.

Search / Export

Property Description
app.title.search.${name} Page title for search name.
ui.label.quickFilters.${name} Search quick filter name.
label.ui.aggregate.${key} Search page provider aggregate key.
searchResults.highlight.field.${name} Label for search results field name.
displayModeButton.display.${name} The name of the search display mode.

Template Rendering

Property Description
templateRenderingPage.processor.${name} Label for the processor's name.
templateRenderingPage.outputFormat.${format} Label for the output format.
templateRenderingPage.paramType.${type} Label for the parameter's type.
templateRenderingPage.paramType.content.${type} Label for the content type.

Miscellaneous

Property Description
admin.ai.export.${name} Export for AI field name.
app.title.${page} The title of the page, based on the page name.
error.${code} HTTP error or status code (e.g., 200, 404, 500).
exportButton.${name} Export rendition name.
themes.${name} The name of the theme.

Vocabularies

As opposed to other UI translations, Vocabularies are translated on the server side. Entry values must be added to the messages_${lang}_${country}.properties file in order to be translated on the client. This allows the vocabulary REST endpoints to provide the appropriate translation for headless clients.

  • label.directories.${vocabularyName}.${entryLabel}: Specify the translation for a vocabulary entry with vocabularyName and entryLabel.

We'd love to hear your thoughts!

All fields required