Module translation
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.
$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 are only recognized, if the language string is surround with double quotes!
Recognized module translations then are provided on the translation page of a module or in the /wiki/spaces/FFBCIN/pages/185893018 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.