Friday 30 May 2014

How to Translate Start Center Contents?



If you would like to translate the start center contents then you need to translate the following

  • Result Set Portlet Headings
  • Result Set Portlet Columns
  • Start Center Headings
Portlet Descriptions, "headings on portlets", are picked up from the LAYOUT table and the LAYOUT.DESCRIPTION field is merely LOCALIZABLE and MLSUPPORTED. These strings are picked from MAXLABELS or L_MAXLABELS. Below are the steps to translate the portlet headings.
INSERT INTO L_MAXLABELS(L_MAXLABELSID,LANGCODE,value,ownerid) SELECT L_MAXLABELSSEQ.NEXTVAL,<langcode>,<translated text>, MAXLABELSID FROM MAXLABELS WHERE VALUE LIKE <portlet heading> AND MAXLABELSID NOT IN (SELECT OWNERID FROM L_MAXLABELS WHERE OWNERID IN(SELECT MAXLABELSID FROM MAXLABELS WHERE VALUE LIKE <portlet heading> ) and langcode=<langcode>);

Result set columns are available in RSCONFIG table. Translation for RSCONFIG.DESCRIPTION retrieved from 
maxattribute/l_maxattribute table. So you don’t need to do the translation separately for RSCONFIG.DESCRIPTION if the 
translation is available in l_maxattribute.
 
Start Center Descriptions, "headings on Startcenter", are picked up from the SCTEMPLATE table and the SCTEMPLATE.DESCRIPTION. These strings are picked from MAXLABELS or L_MAXLABELS. Below is the script to translate the start center headings.
 
INSERT INTO L_MAXLABELS(L_MAXLABELSID,LANGCODE,value,ownerid) SELECT L_MAXLABELSSEQ.NEXTVAL,<langcode>,<translated text>, MAXLABELSID FROM MAXLABELS WHERE VALUE LIKE <SC Template heading> AND MAXLABELSID NOT IN (SELECT OWNERID FROM L_MAXLABELS WHERE OWNERID IN(SELECT MAXLABELSID FROM MAXLABELS WHERE VALUE LIKE <SC Template heading> ) and langcode=<langcode>);
 
Start center template needs to be updated after modifying the start center contents. 
 
First of all you have to identify the set of start centers to be reset. In this example I want to reset all the start centers 
of the user's belonging to SECGROUP security group. Run this select and check the results. 

DELETE FROM rsconfig WHERE layoutid IN (SELECT layoutid FROM layout WHERE scconfigid IN (SELECT scconfigid FROM scconfig WHERE groupname='SECGROUP'));
DELETE FROM faconfig WHERE layoutid IN (SELECT layoutid FROM layout WHERE scconfigid IN (SELECT scconfigid FROM scconfig WHERE groupname='SECGROUP'));
DELETE FROM inbxconfig WHERE layoutid IN (SELECT layoutid FROM layout WHERE scconfigid IN (SELECT scconfigid FROM scconfig WHERE groupname='SECGROUP'));
DELETE FROM kpilconfig WHERE layoutid IN (SELECT layoutid FROM layout WHERE scconfigid IN (SELECT scconfigid FROM scconfig WHERE groupname='SECGROUP'));
DELETE FROM kpigconfig WHERE layoutid IN (SELECT layoutid FROM layout WHERE scconfigid IN (SELECT scconfigid FROM scconfig WHERE groupname='SECGROUP'));
DELETE FROM actionscfg WHERE layoutid IN (SELECT layoutid FROM layout WHERE scconfigid IN (SELECT scconfigid FROM scconfig WHERE groupname='SECGROUP'));
DELETE FROM portletdisplay WHERE layoutid IN (SELECT layoutid FROM layout WHERE scconfigid IN (SELECT scconfigid FROM scconfig WHERE groupname='SECGROUP'));

DELETE FROM layout WHERE layoutid IN (SELECT layoutid FROM layout WHERE scconfigid IN (SELECT scconfigid FROM scconfig WHERE groupname='SECGROUP'));

DELETE FROM scconfig WHERE scconfigid IN (SELECT scconfigid FROM scconfig WHERE groupname='SECGROUP');

When the user either logs in or returns to the start center, the system will rebuild the start center from the appropriate template that was updated.

No comments:

Post a Comment