madmax33
13th November 2006, 18:42
Hi everyone, I am looking for a way to change the user language on the fly on baan code. I understand that the language code is loaded with the BW connection but is there a way to overwrite this directly in the code?

Thanks

en@frrom
14th November 2006, 10:26
Hi,

The predefined variable language$ contains the language code. Officially this variable is read only, however you can change it in code without a problem (I have just tested this on Baan 5). Be careful however when overwriting the language code. Be aware that all the language dependant objects will be read in that language, if existing (otherwise errors)...

What is your requirement? Why do you want to change it?

Regards,
Eli

mr_suleyman
14th November 2006, 14:58
Hi,
You can use BSE_LANG predefined variable. You can manage language options by changing its value from baan configuration file. (defult.bwc)
As far as I know there is no direct way to change language in code. If it is possible may be user must relogin to take this effect and reconfig should be done. I mean same thing! You can change language by changing value of BSE_LANG.
sample bwc configuration file content
[ApplicationServer]
bse=/baan/bse
bshell=bshell
command=-- -set BSE_LANG=2
location=
connection=
[Remote]
protocol=EXEC
hostname=10.190.12.10
portnumber=512
domain=
username=test
password64=
logindialog=YES
serveros=
[NLS]
locale=
RightToLeft=False
[Font]
fontName80=Fixedsys
fontWidth80=0
fontHeight80=-12
fontWeight80=normal
fontItalic80=NO
fontName132=Fixedsys
fontWidth132=0
fontHeight132=-12
fontWeight132=normal
fontItalic132=NO
[Automation]
className=Baan4.Application.default
classId={1223232333}



I hope it may give you some idea


Good Luck

madmax33
14th November 2006, 16:31
Hi Thanks for the tip I will give it a try.
And since this is mainly for reporting purpose, I might just change the rprt_open() function for brp.open() this way I can select the language code of the report.

Thanks

en@frrom
14th November 2006, 16:40
If this is for reporting purpose only, you should really not manipulate the language. Just use the standard functionality, by opening the report in the desired language.

Good luck,
Eli