(RPG) Multi-language app

Please do not use to report errors- use your regional help desk.
Please mark posts as being for RPG or RDMLX (LANSA) developer.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
Fabrice Geay
Posts: 13
Joined: Fri Apr 05, 2013 8:33 pm
Location: France - Valence

(RPG) Multi-language app

Post by Fabrice Geay »

hy,


I would like to create an app multi-languages ​​(eg French / English).
I know I am obliged to make a schema for a language.

Is it possible that the RPG program knows what default language is used by the iPad?

Is the captions for schema are customizable from RPG?
PascalvanDoorn
Posts: 5
Joined: Sat May 05, 2012 5:06 pm
Location: Amsterdam, The Netherlands

Re: (RPG) Multi-language app

Post by PascalvanDoorn »

Hi,

I think you should check the documentation: http://www.longrangemobile.com/docs/LRP ... struct.htm.

This can be returned with the latest version RV11.

Pascal
Fabrice Geay
Posts: 13
Joined: Fri Apr 05, 2013 8:33 pm
Location: France - Valence

Re: (RPG) Multi-language app

Post by Fabrice Geay »

Thank you Pascal,

I can retreive the language of the current client.

And for me second question have you got an idea.
PascalvanDoorn
Posts: 5
Joined: Sat May 05, 2012 5:06 pm
Location: Amsterdam, The Netherlands

Re: (RPG) Multi-language app

Post by PascalvanDoorn »

Fabrice Geay
Posts: 13
Joined: Fri Apr 05, 2013 8:33 pm
Location: France - Valence

Re: (RPG) Multi-language app

Post by Fabrice Geay »

I'll try. I'll let you know
Fabrice Geay
Posts: 13
Joined: Fri Apr 05, 2013 8:33 pm
Location: France - Valence

Re: (RPG) Multi-language app

Post by Fabrice Geay »

hy,

I have updgrade my LongRange for use the ClientLanguage.
But the value of ClientLanguage is always '001-000-00' even if i change the default language (My iPad had a French Configuration) to English i have always '001-000-00'.
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: (RPG) Multi-language app

Post by MarkDuignan »

Could you run the shipped RPG demo?

Programming Examples -> Use Case Examples -> Mobile Device Details.

Then take a screen shot and post it to the forum?

Eg: I see this. The language code shows an “en” …..
Capture.PNG
Capture.PNG (73.28 KiB) Viewed 8322 times

This is shipped RPG example program LRNG_DEMO/SOURCEEXAM/EXAM0011.
Fabrice Geay
Posts: 13
Joined: Fri Apr 05, 2013 8:33 pm
Location: France - Valence

Re: (RPG) Multi-language app

Post by Fabrice Geay »

Hi marck
if I understand correctly, the variable ClientLanguage found in the SystemInfo can not be read directly to determine the language used on the iPad.

In the EXAM0011, it uses a LRNG_GetSystemValues ​​with CURRENT-DEVICE-SYSTEM-LANGUAGE parameter.

This is what I need.
thank.
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: (RPG) Multi-language app

Post by MarkDuignan »

The SystemINFO documentation is incorrect.

There is no language field in the shipped data structure .........

Code: Select all

     D*-------------------------------------------------------------------------
     D* The SystemINFO data structure                                           
     D*-------------------------------------------------------------------------
     DSystemINFO       DS          4096    Qualified                            
     D DesignMode                     5I00                                      
     D aXesRootPath                 512A                                        
     D LRNGImagesPath               512A   Varying                              
     D LRNGDemoImagesPath...                                                    
     D                              512A   Varying                              
     D DeviceTypeName...                                                        
     D                               10A                                        
     D DeviceSizeCategory...                                                    
     D                               10A                                        
     D DeviceScreenWidth...                                                     
     D                               10I00                                      
     D DeviceScreenHeight...                                                    
     D                               10I00                                      
     D aXesRootURL                  512A                                        
     D ClientGUID                    40A                                        
     D ClientRuntimeVersion...                                                  
     D                               10I00                                      
     D ServerVersion...                                                         
     D                               11A                             


What RPG SystemINFO.xxxxxxxx variable name did you use in your original code?

We will amend the doco.

The reason for this change (which was done at the last minute) is that in theory the language can change while an App is active (eg: Italian and French speakers sharing a warehouse device). Not sure whether you would bother to accommodate this in an application though.
Fabrice Geay
Posts: 13
Joined: Fri Apr 05, 2013 8:33 pm
Location: France - Valence

Re: (RPG) Multi-language app

Post by Fabrice Geay »

hi,

Actually, I only use the LRNGImagesPath in my code.
Post Reply