cancel
Showing results for 
Search instead for 
Did you mean: 

Changing Language of Web Dynpro application on button click

Former Member
0 Kudos

Hi experts,

When we execute web dynpro application it takes browser langauge as

default Lanaguage.

We can change text of application by changing SAP-Language in url.

But my requirement is :

I have to add two button English and German on web dynpro application.

When I click on German Button text of appliaction should convert into German,

when on english text should convert to english.

Please tell me how to do this.

Thanks in advance

--

Regards,

Kulvendra Kumar

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You can't really dynamically switch the logon language completely. It has to be set at time of logon. You would have to reload the application via a navigation plug and specify the new language as a URL parameter.

former_member1287623
Participant
0 Kudos

I'm working with a view reset if the language changed.

if language_changed = abap_true.

view->reset_view( ).

endif.

Does only work in WDDOMODIFYVIEW but so far it worked well.

Disadvantage is that you have to reset every view then

Answers (1)

Answers (1)

pranav_nagpal2
Contributor
0 Kudos

hi,

you know how to use OTR??? OTR is the concept we use for internationalisaton......

go to transactio sotr_edit

first for language english-->>

give text and alias ..... remember the alias name..... and click on create.......

similarly for language german u can give text and alias....

now in your application you have use this method

otr_servcentrale = cl_wd_utilities=>get_otr_text_by_alias(

'ZHRWEBDEV/SERV_CENTRAL')

to fetch the otr text in variable otr_servcentrale.

regards

pranav

Edited by: Pranav Nagpal on Dec 3, 2008 9:33 AM

Former Member
0 Kudos

Hi,

Thanks for your help.

I am using dictionary text.

My requirement is :

I have to change system default language on button click, Text conversion happens automatically.

Regards

Kulvendra

pranav_nagpal2
Contributor
0 Kudos

hi,

it will change automatically only if you give same alias name for both the languages..... wht i was saying that on click on button you can use the method i mention in above post to read the text using alias name....

but since you are using dictionary text i wont be able o help you in that regard as i have never worked on that......

regards

Pranav