IBM Support

Maximo Language Files and Tables - Demystified

Technical Blog Post


Abstract

Maximo Language Files and Tables Demystified

Body

Overview
Maximo translations for the numerous languages available are provided if XLIFF files.  A program called TDToolkit processes the files and creates tables and table entries which hold the translations along with pointers to the original text which is to be translated. 
Tables and their contents
Sometimes the beginning is not the best place to start. Let's look at the tables involved first

 1. Base Language
The first thing to remember with Maximo is that when you install it you create a Base Language.
The Base Language is recorded in the MAXVARS table. To find the Base Language use this SQL query:
SELECT VARVALUE FROM MAXVARS WHERE VARNAME='BASELANGUAGE';
It will return a 2 character code for the Base Language in use.

Language codes for languages supported in Maximo:
Language LANGCODE
English EN
French FR
Spanish ES
German DE
Italian IT
Japanese JA
Korean KO
Brazilian Portuguese PT-BR
Chinese ZH
Arabic AR
Croatian HR
Czech CS
Danish DA
Dutch HL
Finnish FI
Hebrew HE
Hungarian HU
Norwegian NO
Polish PL
Russian RU
Slovenian SL
Swedish SV
Turkish TR
2. Additional Languages
Installation of Base Language and also of additional languages creates rows in the LANGUAGE table.
To list all languages active on the system issue this SQL query
SELECT LANGUAGENAME,MAXLANGCODE from LANGUAGE WHERE ENABLED='1';
Note - Issue the above SQL without the 'WHERE ENABLED='1' and you will get a list of all languages that are enabled or not.
 3. Language Version
Language version information is stored in the TDTVERSION table. There will be entries for each PMP / Language combination.
The version information is used by the TDToolkit program to allow further translations to be added without having to translate everything again. It can then just process the entries with a higher version number than that stored in the TDTVERSION table.
To check on version information for all entries for a language issue this SQL query
SELECT PMPNAME,VERSION FROM TDTVERSION WHERE LANGUAGE=‘DE’;
Note – Change DE to any other 2 digit language code as required. The list of possible codes is above.
4. Translation Tables
Installing an additional language will cause a number of tables to be created or updated which have the prefix ‘L_’. These are the tables that store the actual translation text entries. There will be one of these L_ translation tables for each existing table which has translations available
Examples:
L_ITEM will hold the translations for the ITEM table
L_MAXLABELS will hold the translations for the MAXLABELS table
Each L_xxxxxxxxx table will have a column called OWNERID
The number in the OWNERID field for each individual row will point to the the xxxxxID entry in the corresponding table for which it holds the translation
example     ITEMID MAXLABELSID COMPANYID  etc
For this example, we will look at a Maximo implementation with Base Language of English and additional languages of German and Norwegian (because I happen to have one I prepared earlier)
SELECT VARVALUE FROM MAXVARS WHERE VARNAME='BASELANGUAGE';
Result = EN             
SELECT LANGUAGENAME,MAXLANGCODE from LANGUAGE WHERE ENABLED='1';
Results =     Deutsch DE         English EN       Norsk NO      
Now, if we take a random row from the ITEM Table (and note I am not listing all fields here - just the ones that we are interested in for the example)
ITEMNUM=PMSC_2017A DESCRIPTION=Firewall Change Requests ITEMID=19
We can look at the L_ITEM table for rows where OWNERID=19 (as we know from above that the OWNERID points to the ITEMID or xxxxxxID if another table were used instead of ITEM)
SELECT * FROM L_ITEM WHERE OWNERID=’19’;
In this instance 2 rows are returned (not all fields shown for clarity)
1.       OWNERID=19 LANGCODE=DE   DESCRIPTION=Requests bzgl. Firewall-Anderung
2.       OWNERID=19 LANGCODE=NO   DESCRIPTION=Foresporsler om brannmurendring
OK, now we know about the L_xxxxxx tables, lets look at the files that were used to populate the tables
XLIFF Files
Xliff files are not unique to Maximo. They are based on the OASIS open standard. XLIFF is an acronym for XML Localization Interchange File Format.
1. Location
The xliff files are stored in separate directory structures based on the 2 character language code
{maximo_install}\tools\maximo\{LANG_CODE}\xliff
For example, the core French files would be found under {maximo_install}\tools\maximo\fr\xliff
Within this directory, there may also be subdirectories which store xliff files for PMPs. So in the above case, the XLIFF files for service provider would be stored in {maximo_install}\tools\maximo\fr\xliff\service provider
2.  Format
The Maximo xliff file starts with some version information at the top for XML and xliff
 <?xml version="1.0" encoding='UTF-8'?>
<xliff version='1.1' xmlns='urn:oasis:names:tc:xliff:document:1.1' xmlns:sup='maximo'>
This is followed by a reference to the original file and the languages involved
(Note – A Maximo xliff file will contain translations for only 1 language)
 
<file original='MAXLABELS.xliff' source-language='en' target-language='no' datatype='plaintext'>
Next level down after the file information is the group. There can be one or more groups within the file <group>

Within the group will be a sup:Source Info entry which identifies the Table used and the columns within it to look for the original source of information to translate.
   <sup:SourceInfo>
    <sup:Table>MAXLABELS</sup:Table>
    <sup:ID-col>APP:ID:PROPERTY</sup:ID-col>
   </sup:SourceInfo>
The above example will use the MAXLABELS table and search on the 3 columns listed to locate the source information which is to be translated. Within the group and after the sup:Source Info will be a number of trans-unit ID entries.  Each unit id entry holds the 3 values to search on in the original table and provides the translation to write to the L_******* tables
 
  <trans-unit id='100007' size-unit='char' maxwidth='4000'>
   <source>Activity</source>
    <target>Aktivitet</target>
    <sup:Reference Type='Column'>VALUE</sup:Reference>
    <sup:Reference Type='DatabaseID'>LOOKUPS:pmcomjpnum_lookup_tablebody_col_9:label</sup:Reference>
    <sup:Reference Type='Comment'></sup:Reference>
    <sup:Reference Type='NotEscape'>0</sup:Reference>
    <sup:Reference Type='MLSupported'>1</sup:Reference>
    <sup:Reference Type='MLInUse'>1</sup:Reference>
    <sup:Reference Type='Version'>V7100-001</sup:Reference>
   </trans-unit>
So.......   In the above example
we search the MAXLABELS table, for entries where 
APP=LOOKUPS     ID=pmcomjpnum_lookup_tablebody_col_9      PROPERTY=label
When we find matches, we write a translated data to the L_MAXLABELS table and make the OWNERID field point to the MAXLABELSID of the original row in the MAXLABELS table.   In this row, we set the VALUE filed to 'Aktivitet'  (from the target line above)   
It is also worth mentioning the version information here as this is stored in the TDTVERSION table.  This allows a reference to the latest version of updates made and so allows for subsequent updates to be added without re-translating everything   i.e. tell TDToolkit on a parameter only to make updates above a certain version number.
TDToolkit
This is the tool that processes the XLIFF files and updates the table.    It has other functions which include (but is not limited to)
  • Installs language tables
  • Updates language tables
  • Sets/Alters Base Language
  • Exports translatable database entries to files - this allows for user created translations
Example commands to add a Language
To add Multi Language functionality to the database, use the –ADDLANG[Lang_Code] flag, do not add a space between –ADDLANG and the Language code.
This will assume that the XLIFF files are under your {Maximo_Install}\tools\Maximo\{LangCode}\xliff directory.
for example:TDToolkit –addlangfr

This will import the French translations to the database.
You will need to restart the application server for the language changes to take effect.
If you want to learn more about TDToolkit and its functions, including other example commands, look within your Maximo file system for \maximo\tools\maximo\classes\psdi\xlate\TDToolkit_Overview.doc

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

UID

ibm11133073