cancel
Showing results for 
Search instead for 
Did you mean: 

Internationalization in WebDynpro applications

Former Member
0 Kudos

Hi,

I have a requirement to internationalize my WebDynpro application.

I have created a WebDynpro component and maintained all the language dependent texts in the .xlf files of that component. 2 applications have been created for the component- 1 in English and 1 in German. Both work fine in their resp. locale when run independently.

Scenario: When the user runs the application, all texts appear in English (default). However, if the user desires to obtain the application in German, he is supposed to click on a button to get all the texts in German.

Tried solutions:

1. Making use of the Exit plug. When the user clicks on the German Button, we fire the Exit Plug to the application having "sap.locale=de"

2. Appending "?sap-locale=de " to the application URL.

In case of both of the above solutions, the texts do not change as per the locale,however, when I copy the same URL and start a new session in a new browser, the texts appear as per the Locale.

Is there any way of changing the locale dynamically during the same session ?

Regards,

Gaurav.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Gaurav,

there is still a problem in the portal. If you start an WD application in a language and you want to switch it to a new language this NOT work.

You must select a NEW Language close all browser and login with the new language.

Only now the right new language is shown.

It is NOT possible to switch the language of a WD application in the SAP portal !!

regards

Gunter

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Gaurav,

You can use key-Value concept of java and KM file concept.

You have to create two java files for declaring constant and key/Value.

You have to define setter/getter method.

You have to use parameterization concept for the Web Dynpro UI name means need to declare attribute and need to bind with the text value for UI's

You have to store key/value file in the KM doc ladder.

You have to pass file name to Application parameter property into the Application iView.

You have read this application parameter in the controller and need to use has map and session concept to read the files value.

Hope this may help you.

Deepak!!!

former_member214651
Active Contributor
0 Kudos

Hi Gaurav,

Even i had the same problem which u have described. try using a properties file which contains the correspoding text for the languages.

On click of the button, get the text from the properties file. This is another way of doing it.

You also have a document for acjeiving this on the SDN forum.

Regards,

Poojith MV

Former Member
0 Kudos

Thanks Gunter and Poojith for your replies.

Former Member
0 Kudos

Hi,

Please have a look at this threads

Regards,

Saravanan K