Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

With a module translation you can translate certain parts of your Module for all existing frontend languages.

Translating a module is necessary when the client in which the module is used has more than one language. Since modules are not developed for only one specific client, they generally should be developed by using the module translations.

Using module translations is quite easy.

The function to call a module translation is "mi18n". Since CONTENIDO 4.9 it supports multiple parameters which can be later replaced in the location string.

 

Example
$labelSearch = mi18n("LABEL_SEARCH"); // LABEL_SEARCH = "Search"
 
$results = 10;
$labelSearchResults = mi18n("LABEL_SEARCH_RESULTS", $results); // LABEL_SEARCH_RESULTS = "Found %s search results"

Note

Module translations currently only are recognized, if language string is surround with double quotes!

 

Recognized module translations then are provided on the translation page of a module or in the mass translation in the content area for translation in all available frontend languages. 

Note

Since CONTENIDO 4.9 location strings must be translated, otherwise an error is displayed.
The previous behaviour was displaying the translation string instead. 

  • No labels