The multilingual support address the multilingual aspects in different manner:
- any dashboard and final user can have UTF8 characters, so that you can create your dashboard in any language
- Mobile Apps of Snap4 have 6-7 languages and more can be easily added
- Content and data strings can be provided in any character
- Multilingual user interface on menu and string is managed via Translation Manager as explained in the following
- the Translation Manager is presently enabled only for RootAdmin role. Thus, on Www.snap4city.org is managed by DISIT lab
- if You would like to add a language on the menu' you can pass from the Excel File which can be downloaded from here
- EXCEL file ZIPPED for adding more language on MENU: https://www.snap4city.org/drupal/sites/default/files/files/menu-trad-XX-v0-1.zip
- please note that the excel file includes: Reference Test (the English lable to be translated), it_IT language (the Italian translation in which you can see that some of the key terms have not been translated since they are keywords of the system, and column C with language XX_XX in which you can provide you language in UTF8 characters, so that you can write there in Greek, Chinese, Japanese, Arabic, etc.
- once you have produced the file, please mail to mailto:email@example.com
- on your installations on premise you can directly manage the Translation Manager
- Multilingual user interface on Dashboard Builder and other tools is managed via POE files and editor, as described in the following
- this is the group of files which include ITA, ENG and other languages to be finalized.....https://www.snap4city.org/drupal/sites/default/files/files/translation_files-july-2021-1.zip
- Multilingual on Drupal CRM Living Lab can be managed into the Drupal approach, and thus it is available on the OnPremise version of the Living Lab or CRM, see https://www.drupal.org/docs/multilingual-guide
- Node-RED is a tool endowed of multilingual support, https://nodered.org/docs/creating-nodes/i18n
- CKAN is a tool endowed of a multilingual support, see: https://docs.ckan.org/en/ckan-2.4.0/maintaining/multilingual.html
Poedit Translation Editor
The translation of the texts in the application source code is performed through text-based files in .po format. These files contain a list of the original text strings in various files and it is possible to define the corresponding tradition in a certain language.
A .mo compilation file is associated with each .po file.
For each language into which you want to translate the application code, there is a couple of these files.
/locale/[ language code*]/LC_MESSAGES/messages.mo
* the language must have an acronym such as "it" for Italian, "fr" for French, etc ...
The .po files are structured as a text file that associate a textual string present in the source code identified with the file name and the line number with the content of the text both in the original language and in its translation.
Example, translation in Italian language:
msgid "Data and widgets"
msgstr "Dati e widget"
msgid "Check and summary"
msgstr "Controllo e riepilogo"
The string traduction can be done manually through an editor tool called Poedit Translation Editor.
This tool allows you to create, modify and compile .po files.
The graphical interface is presented as a table with two columns, in the first there is the list of the original text strings and in the right column you can enter a translation of the chosen language. The tool presents suggestions on the chosen translation.
Poedit Translation Editor is available in various versions with different prices, both free and paid, which define a limit number of strings to be translated.
Poedit Translation Editor Link: https://poedit.net/
A tool has been created for the management of the tradition of textual strings in various languages using a table in the database that manages a list of strings, for example the title of the menu items, allowing their translation into a set of languages defined by the program configuration .
The table structure consists of an incremental numeric id, the string value in the original source code, the language code and its translation.
The program prevents the creation of duplicate original text + language + tradition elements.
While for each original text there is a line with a translation for each language.
The user has the possibility to manually add new translations through the command "Create New Text translation".
It is also possible for the user to modify an already existing translation using the "Edit" button associated with each element of the table. it is possible to change the language and the translation, but not the original text.
To ensure faster updating of the translation of the application menu items, there is a command called "Import Menu" that allows the user to select a type of menu and the code of a language, it will create a list of the original texts , with the indication of the language, associated with a series of blank lines that the user can manually fill in with the translation.
In case of adding new elements of a menu, if a menu has already been imported, only elements that are not already present in the translation menu table will be added.