Author Topic: Multi language Support  (Read 3872 times)

Benjamin Dasari

  • GuiXT Forum
  • Newbie
  • *
  • Posts: 95
    • View Profile
Multi language Support
« on: August 25, 2017, 10:48:09 AM »
Purpose:
There are two ways to handle different languages in Liquid UI Scripts:
1. You maintain a distinct set of scripts for each language.
2. You work with one set of scripts, covering all languages within the script.

Here we describe the 2nd possibility.
An advantage of the 2nd  approach is that you can simplify your maintenance work: You can split each script into a language independent part in which you delete and rearrange fields, set defaults etc, and a language specific part in which you rename fields or add new texts.

A disadvantage is that you have to use the technical field names in the language independent part.

In the Liquid UI Configuration file, i.e., guixt.sjs we specify the below option:
nolanguagekey = true;

NOTE:
1. Make sure to specify "nolanguagekey = true;" in guixt.sjs file.
2. Make sure to use the technical names of the screen elements in the scripts to use it for multiple languages.
3. These files will be affected:
  <key>SESSION.SJS, <key>LOGON.SJS, SAPLSMTR_NAVIGATION.<KEY>0100.sjs,DOMTEXT.<KEY>.txt and dom.<KEY>.domain.txt
  If nolanguagekey is true, <key> will not be used in these files.
  In the case of DOM, the new filenames are DOMTEXT.txt and dom.domain.txt

Liquid UI now searches the scripts without a language key, e.g. instead of "SAPMV45A.E0101.sjs" it reads the file "SAPMV45A.0101.sjs" [OR] instead of "ESESSION.sjs" it reads "SESSION.sjs".

Liquid UI Code:
----------------------------------------------------------------------------------------------------------------------------------------------
Script File Name: SAPLSMTR_NAVIGATION.0100.sjs   // Notice the name of the file specified without the language key
----------------------------------------------------------------------------------------------------------------------------------------------
// Read an inputfield using technical name and display multi language support
function readBOMApplication(){
   onscreen "SAPLSMTR_NAVIGATION.0100"
      enter("/nIH01");
   
   onscreen "RIIFLO10.1000"
      set("V[z_ih01_bomappl]","&F[DY_CAPID]");    // "BOM Application" field
      enter("/n");
}

// User Interface
clearscreen();
box([2,2],[8,30]);
inputfield([3,4], "BOM Application", [3,20], {"name":"z_ih01_bomappl", "size":4});
pushbutton([5,4], "Test MultiLanguage Support", "?", {"process":readBOMApplication, "size":[2,24]});


See attachments for code samples!

« Last Edit: December 14, 2017, 11:56:35 AM by Benjamin Dasari »