cancel
Showing results for 
Search instead for 
Did you mean: 

Change WD language as per URL parameter

Former Member
0 Kudos

Hi Expert,

I tried to search the solution from already posted entries. But could not find any. So forgive me if I am repeating an already answered one. My requirement is like below:

1. I have a WD application running as a WD iView inside portal. the application is now totally in English language.

2. The iView is part of a portal role - so the users can access it via the portal tab.

3. Now the users are looking for passing on a language parameter in the portal URL and to get the WD application screen in that specified language. For example upto now they are typing in http://www.mycompany.com, now they want to type in http://www.mycompany.com?language=de.

Now my question is manyfold. Whether this is at all possible. If YES, then please let me know how should I achieve this. If NO, then whether we have any alternative of achieving the same sort of functionality. Please help.

Regards, Shubho

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Shubhadip,

Please read my answer to the thread on similar issue:

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

Hi VS,

thanks a lot for helping me here and sorry for delay in responding. I tried the solution provided by you. I developed one one view with a combo box & a button. And another view with just a sample text view. In the next view I duplicated the view.xlf file and pasted with _de.xlf extension for german. I copied your code snippets into wdDoModifyView and in the onActionGo methods. But after that when I select Deutsheland from the list box and press Go - nothing happens. The plug is also not firing. Most probably due to the forced log off. I also tried having some text in the first view itself and creatring _de.xlf file for the same. But didnt work. Its still picking the default english language text only. Can you please guide where I am doing wrong here?

Also - is it possible to have the same functionality without the combo box but from a URL parameter? My current application is integrated in portal. So I type in mycompany.com as the url. Now if I type in mycompany.com?locale=DE will I be able to get the value and process it as you mentioned from the combo box value? Please guide.

Regards,

Shubho

Former Member
0 Kudos

Shubhadip,

Sure, you may get the right result without combox box (actually, in WD we call them DropDownBy<Index/Key>

In fact, if you study my code, then you may notice that I'm using URL with locale parameter after changing DropDown selection, the name of parameter is <b>sap-locale</b>, i.e. sap-locale=en_US or sap-locale=de.

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

Hi VS,

thanks again. I tried the code block which you provided in your first post - but somehow that didnt work. Will it be possible for you to send me a small demo application to shubhadipghosh@yahoo.com - or I can also send you my application if I get your id. I havent yet tried the URL parameter option. I know that sap-locale should be the parameter name there. But I would like to get success first in the combo box option. It seems when I select the language from the combo box and pressing the go button - then the page is getting refreshed but the plug to next view is not firing. I even tried putting some text fields in the same view itself and copied the xlf files with german values - but still no effect.

Please suggest.

Regards,

Shubho

Former Member
0 Kudos

Hi VS,

finally I could get the multi language WD application working based upon a combo box value as you suggested. Thanks a ton for the code. Now I am having a new problem. I have integrated the WD app in an iView in my portal and accessing it via a role. First the screen displays perfectly - but whenever I select a value from the list box its throwing an error shwoing

200 OK

Application was terminated!

Details: No details available

its happening consistently whether I preview the iView or access it via portal role. But the application is running fine in stand-alone mode. Could you please help me in order to understand where am I going wrong here.

Regards,

Shubho

Former Member
0 Kudos

Shubho,

I believe you must use WDPortalNavigation in case your WD application is running as iView and use exit plug when your WD application is stand-alone. Btw, you may check the mode via WDPortalUtils.isRunningInPortal()

Valery Silaev

SaM Solutions

http://www.sam-solutions.net