IBM Support

Manually adding entries for a secondary Language in 7.5

Technical Blog Post


Abstract

Manually adding entries for a secondary Language in 7.5

Body

If you have added just a few database entries to a table that has a language table and want to add an entry in the language table for a secondary language, you can do this manually. 
 
In this example, we will insert an Italian and German record in the Language table for Maxlabels.
Before you try adding secondary translations, make sure Multi Language is set up for your column,
select mlsupported, mlinuse from maxattribute where objectname = 'MAXLABELS' and attributename = 'VALUE';
mlsupported mlinuse
1 1
 
If not both columns return 1, use the database configuration application in Maximo to enable ML.
First, find out what the Language table is for your table.
select langtablename from maxtable where tablename = 'MAXLABELS';
langtablename
L_MAXLABELS
 
Find the link between the two tables, the Ownerid column in the Language table refers to the unique column name for the owner table.
select uniquecolumnname from maxtable where tablename = 'MAXLABELS';
uniquecolumnname
MAXLABELSID
 
You are also going to need to know the ID column for the Language table,
select uniquecolumnname from maxtable where tablename = 'L_MAXLABELS';
uniquecolumnname
L_MAXLABELSID
 
Now we know that the language table is called L_MAXLABELS and the unique column for MAXLABLES is MAXLABELSID.
 
Find the record you want to add as a secondary langague.
select maxlabelsid, value from maxlabels where value = '[Value in Baselang]';
maxlabelsid value
1884646 Value in Baselang]
 
Now you know that the ID for this record is 1884646. If this query did return more than one record, do some investigating until you find your specific record.
So to insert the translation into the Language table for Italian, use the following SQL,
insert into l_maxlabels (l_maxlabelsid, ownerid, langcode, value) values (1, 1884646, 'IT', '[Italian value]');
 
You will of course replace 1 with the correct sequence depending on the database platform, note that l_maxlabelsid is the unique column for the Language table.
 
To add another record for German,
insert into l_maxlabels (l_maxlabelsid, ownerid, langcode, value) values (2, 1884646, 'DE', '[German value]');
You will of course replace 2 with the correct sequence depending on the database platform, note that l_maxlabelsid is the unique column for the Language table.
 
NOTE: This assumes that your secondary language is already setup and enabled. After the update, you need to restart MXServer.
 

[{"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

ibm11132683