on 10-11-2006 5:06 PM
Hi all,
is it possible to change the locale of an WebDynPro applicatin after it was loaded?
What I want is something like a dropdown-box with available locales, the user can then select one and the webdynpro gets reloaded. After that reload the whole application should be in the new language.
I translated the needed .xlf-files and everything works more or less fine via the browser-based language setting (Accept-Language header) at least after i close all browser windows. Same goes for the "sap-locale" URL-parameter, I need to close all browser windows.
There seems to be no possibility to change the language "on-the-fly" after a webdynpro application is loaded, am I right? I only found one single setLanguage()-function in IWDJCOClientConnection but I dont know how this could help me...
Thanks and regards,
Peter
Peter,
You are right -- it is impossible to change locale after application has been started. The only way is to restart application with same URL + additional parameter sap-locale=<loc_LOC>
Some time ago (more then a year) I wrote about this, and my sample application works almost as you described (i.e. drop-down with locales, several translated texts, etc)
However, I never get a problem with browser windows. If you change locale via sap-locale parameter one and only one browser is affected.
Valery Silaev
SaM Solutions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Valery,
thanks for your answer.
The problem I have is that if I start the application with i.e. http://myserver.com:50100/webdynpro/dispatcher/local/MyApplication/MyApplication?sap-locale=en (works as intended, the app is in english) and after that change the sap-locale parameter to "de" without closing all browser windows the application won't change the language and remains english.. I think there is kind of a chaching mechanism that prevents this from working.
So you say you managed to makes things work almost as I intended. Could you please provide me with some sample code?
Thanks and regards,
Peter Osthoff
Peter,
Here is my solution in details (sorry, plain text only):
Valery Silaev
SaM Solutions
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.