New Language

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
kno_dk
Posts: 221
Joined: Tue Feb 23, 2016 12:00 am

New Language

Post by kno_dk »

Hi.

I have created a new language inside LANSA. All labels, Headings etc is missing in the new language. Has anybody created a function which could update alle labels etc on every object (fields, files, functions, process etc) from one language to another? is it code they want to share?

/kno_dk
User avatar
Dino
Posts: 477
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC
Contact:

Re: New Language

Post by Dino »

ah the old good open system utilities with no warranties.... not sure if that was an option in there,
but if you do something like a WRKOBJPDM to the DTALIB and filter *FILE PF text multi

Code: Select all

                             Subset Object List                             
                                                                            
Type choices, press Enter.                                                  
                                                                            
  Object . . . . . . . . . . . .   *ALL         *ALL, name, *generic*       
  Object type  . . . . . . . . .   *FILE        *ALL, *type                 
  Object attribute . . . . . . .   PF-DTA       *ALL, attribute, *generic*, 
  Text . . . . . . . . . . . . .   multilingual extension                   
you get something like this with the list of all the tables (I hope) that are used for multilingual, where the text description of the table documents the purpose of the file:

Code: Select all

 Object      Type        Attribute   Text                                 
 DC@F62      *FILE       PF-DTA      Multilingual extension of DC@F03 /EDL
 DC@F63      *FILE       PF-DTA      Multilingual extension of DC@F04 /EDL
 DC@F64      *FILE       PF-DTA      Multilingual extension of DC@F27 /EDL
 DC@F65      *FILE       PF-DTA      Multilingual extension of DC@F15 /EDL
 DC@F66      *FILE       PF-DTA      Multilingual extension of DC@F20 /EDL
 DC@F67      *FILE       PF-DTA      Multilingual extension of DC@F23 /EDL
 DC@F68      *FILE       PF-DTA      Multilingual extension of DC@F31 /EDL
then you can use STRSQL (after doing a full backup of these files, at your own risk, you can get burn if you play with fire, the satellites can pinpoint your location, all the warnings issued...) to find the data you want to copy (select all the fields in the order they are, for example DEM, ENG):

Code: Select all

SELECT F62P#I, F62PLN, F62FLD, F62DES, F62LBL, F62CH1, F62CH2, 
F62CH3 FROM dc@f62 WHERE F62P#I = 'DEM' and F62PLN = 'ENG'
Then you can modify/use that sentence to build this other one, let's say, to create a "POP" language (note the use of 'POP' instead of the correct field in the select sentence:

Code: Select all

INSERT INTO DC@F62 (F62P#I, F62PLN, F62FLD, F62DES, 
F62LBL, F62CH1, F62CH2, F62CH3)                               
SELECT F62P#I, 'POP', F62FLD, F62DES, F62LBL, F62CH1, F62CH2,
F62CH3 FROM dc@f62 WHERE F62P#I = 'DEM' and F62PLN = 'ENG'
now if you want to volunteer, put all this in a CL, RUNSQL, receive parameters and you will be done. Not sure how many times you will use this thought, and even worst, not sure if these files will change data structure with the next epc's. I would think is safer doing it from scratch every time.
kno_dk
Posts: 221
Joined: Tue Feb 23, 2016 12:00 am

Re: New Language

Post by kno_dk »

Hi Dino.

Thanks for your reply. I have just imported the Commerce edition into my Lansa Dev enviroment and I use the danish language for development. But when I use the DAN language I dont have any labels, description at all.
In the documentation for builtin functions there are the PUT_FIELD_ML and the PUT_FILE_ML, and I was hoping that somebody have used these to builtin functions.

I will look into your suggestion.

/klaus
Post Reply