Overload or add translations

Most of the texts and labels used on CMS Ametys are adapted to the browser language. Graphics are adapted to the language of the site map.

The software is adapted to each language by means of translation files, which can be overwritten or added.

Overloading a translation

To override one or more label translations, defined in the plugins Ametys files used, simply redefine the translation in a file located in WEB-INF/i18n/plugins/[nom_plugin]/messages_[lang].xml

[nom_plugin] being the name of the plugin in which the original translation is defined, [lang] being the translation language code

Example: change the wording "Read more" to "Find out more".

This wording is defined in the plugin catalog.cms"under the key CONTENT_VIEW_READMORE.

To overload this key, create the file "WEB-INF/i18n/plugins/cms/messages_fr.xml" and overload the key as follows:

<?xml version="1.0" encoding="UTF-8"?>
<catalogue xml:lang="fr">
    <message key="CONTENT_VIEW_READMORE">En savoir plus</message>

Add a translation

In the same way, it is possible to add a translation in a language not supported by default (to date, plugins Ametys is only available in French and English).

Using the example above, to add the Spanish translation of "Learn more" simply create the file "WEB-INF/i18n/plugins/cms/messages_es.xml" and define the translation of the key CONTENT_VIEW_READMORE.

<?xml version="1.0" encoding="UTF-8"?>
<catalogue xml:lang="es">
    <message key="CONTENT_VIEW_READMORE">Leer más</message>

Please note that overloaded or added translations are common to all graphic charters.

Back to top