Combodo's customers only
Allow to localize data in the Console, adding translations in multiple languages. Results are only visible in the User Portal.
Declare which data have to be localized, and a new tab appears aimed at managing the localized attributes:
In your custom user portal, add a single line of code to activate the localization depending on the current user, and that's all: there is no need for modifying the data model nor rewriting the code of the user portal.
Support all the localizations supported by iTop.
Integrated into the core of the framework so that it is transparent to the DBObject API and the OQL ! For instance, SELECT Service WHERE name LIKE '%Network%' will not give the same results depending on the language of the current user.
The translation is done directly where the data is usually edited.
It is compatible with the module “Request Templates”.
Version | Release Date | Comments |
---|---|---|
2021-12-27 | 1.3.1 | * Fix compatibility issue with iTop 3.0.0 beta 5 |
2020-06-17 | 1.3.0 | * Add Russian translation * Add compatibility with iTop 3.0+ |
2018-12-11 | 1.2.0 | * Improve jQuery compatibility (jQuery 3 since iTop 2.6) |
2017-01-20 | 1.1.0 | Requires iTop 2.2.0. Added an index for high volumes of data. Added a message into the localization form (known limitation) for a better user experience |
2014-07-08 | 1.0.1 | Fixed compatibility issues with iTop >= 2.2.0. The compatibility with older versions of iTop has been preserved. |
2014-06-11 | 1.0.0 | First version |
It is not possible to localize the data on an object during its creation process, just modify it after to add translations.
This has an impact on the MySQL queries generated by iTop. If the functionality is used on a class of objects for which there are lot of external keys, or if an OQL is written with a significant number of joins, then the limit of 64 tables will be reached.
If a user having a language different from the iTop instance, connect to the portal, then using the same browser, connect to the console and modify an object from a class for which Localization is defined, then iTop has a bug and store the object using the user langage instead of the iTop one.
Use the Standard installation process for this extension.
There is one configuration parameter, defining which attributes will be localized:
'scope' => array( 'Service' => array('name', 'description'), 'ServiceSubcategory' => array('name', 'description'), 'RequestTemplate' => array('label', 'description'), 'TemplateField' => array('label'), ),
To load lots of Localized data, you can perform an interactive CSV import example provided for a user in english
Mapping must be done on 4 fields which are:
DataLocalization
for allowed valuesProvide also
You can check existing Localization data, using the “Run queries” and the following OQL:
SELECT DataLocalization SELECT DataLocalization WHERE obj_class='Service' AND language='DE DE' AND attribute='name'
You can then export the result in CSV or Excel
Lets suppose that you want to localized your Services, which are in english and you want to translate in French the name and the description.
1. In your iTop, do an export
of your Services with those fields: id (Primary Key), name and description.
Let's assume you have 2 services like this:
id (Primary Key) | Name | Description |
---|---|---|
1 | Computers and peripherals | Ordering of new hardware (Desktop computer, laptop computer, monitor, mouse, keyboard…) and support in case of hardware failure. |
2 | Software | Management of computer software and applications. Installation, upgrade, troubleshooting and removal of software. |
2. Prepare a file with 2 rows for each of your services, one row for translating the name and one for the description. Result would look like this:
Object class | Object id | Language code | Attribute code | Value |
---|---|---|---|---|
Service | 1 | FR FR | name | Ordinateurs & périphériques |
Service | 1 | FR FR | description | Commander un nouvel équipement (Ordinateur de bureau, ordinateur portable, écran, souris, clavier…) et de l'aide en cas de panne. |
Service | 2 | FR FR | name | Logiciels |
Service | 2 | FR FR | description | Gestion des applications: installation, mise à jour, suppression, analyse de panne |
3. CSV import that file.
Question: Can I localize Request Template Fields?
Answer: Yes, you can localize label
but probably not the initial_value
and the possible values
.
'data-localizer' => array ( 'scope' => array ( 'TemplateField' => array ('label','values'), ), ),
Object class Object id Language code Attribute code Value TemplateField 16 EN US values blue,green,yellow,red,orange,purple,black,white TemplateField 16 FR FR values bleu,vert,jaune,rouge,orange,violet,noir,blanc TemplateField 16 EN US label Requested color TemplateField 16 FR FR label Couleur imposée
values
be cautious:
Question: I have develop my own iTop front-end and it is not translated. What should I do?
Answer: A portal (or any GUI that needs to be translated) must be customized to execute the following line of code:
ApplicationContext::SetPluginProperty(‘QueryLocalizerPlugin’, ’language_code’, UserRights::GetUserLanguage() );
Where UserRights::GetUserLanguage() can be replaced by any other mean to get the language code (e.g: 'EN US').