Nuxeo Server

Labels and Translations Management

Updated: December 5, 2017 Page Information Edit on GitHub

This page is scheduled for review and update. Check back soon for updated content!

The Framework supports resolution of translations using the standard Java Internationalisation mechanism.

Labels can be gathered in .properties files and translated in properties file with the corresponding language suffix. Because of the modularity of the Nuxeo Platform, a specific mechanism allows the Nuxeo Runtime to "build" the complete resources file before deploying it in the web application. You can read the Deployment Model of Nuxeo Platform documentation page for a better understanding. Your plugin must declare the translation resources to the Nuxeo Runtime so that they are taken into account.

  • Let your resources files somewhere in your plugin hierarchy, for instance OSGI-INF/l10n
  • Add an "append" instruction to the deployment-fragment.xml file of your plugin (and add this file if it is not added yet) for each translation file

     <append from="nuxeo.faceted.search.tmp/OSGI-INF/l10n/messages_fr.properties"
          to="nuxeo.war/WEB-INF/classes/messages_fr.properties" addNewLine="true" />
    

Then, you can reference your labels keys from the various context that are provided in the application:

  • on Facelet Templates: 

     <h:outputText value="#{messages['myLabelKey']}" />
    
  • From a Seam Component (TODO)

  • Using the Nuxeo Widgets: most of the Nuxeo widgets hold a "localize" boolean attribute. When set to true, the label attribute content is considered as a key and resolved at display time.

You may want more information about default labels of the Back Office.

You can also use Nuxeo Studio to upload label translations

5 days ago Manon Lumeau Add tags for doc days
11 days ago Manon Lumeau Fix tags for doc days
a month ago manonlumeau Added content-review-lts2017 label
2 months ago manonlumeau NXDOC-1346-FT review screenshot
2 years ago Solen Guitter 4 | ix formatting issue
3 years ago Solen Guitter 3
4 years ago Alain Escaffre 2
4 years ago Alain Escaffre 1
History: Created by Alain Escaffre