Skip to Content
Author's profile photo Former Member

How to internationalize a Web Dynpro application

SAP puts a very strong emphasis on multilingual applications. So if you ever wondered how to make your Web Dynpro application multilingual this is a small how-to Weblog for you. I explain how to make your application multilingual without the need to set up a translation infrastructure (which is still to come but will make everything simpler).


Generate  Language  Files

But at first you will not see any of these resource files because the resource file generator only runs when you right-click on the project and choose “Create Archive”. If I have a Web Dynpro component named


located in the package

and project language set to English, a resource file will be generated for everything inside the component with the name


in the Java package

. Open it and you will see some very simple key value pairs like this:

  1. —————————————————————————

  2. This file has been generated by the Web Dynpro Code Generator


  4. —————————————————————————

  1. Resource bundle for FlightSearchComp

  1. view FlightSearchListView

view.FlightSearchListView.Table_14.Column.Table_14_Seatsmax.Header.text = Seatsmax

view.FlightSearchListView.Button_15.text = back

view.FlightSearchListView.Table_14.Column.Table_14_Airpto.Header.text = Airpto

view.FlightSearchListView.Table_14.Column.Table_14_Airpfrom.Header.text = Airpfrom


What would I need to do to translate this file into German?

I need to create a resource file with the same name but ending

in the same Java package. Then I would need to learn German and put the translated values with the same keys into that file. Let’s go through it step by step.

In the


folder we create a Java package named

. Then we copy the to that location. There we rename the file to

. Then we can open the file and translate the values into German.

The reason we don’t leave the properties file in the gen_wdp folder is because everything that stays there gets deleted next time code the project is rebuild. But in the


folder everything is safe and will be included in the distributable archive.


That’s it! We’re ready to test. First we need to configure our browser for a different language. This browser language is transmitted through an  http header and Web Dynpro application chooses the correct language file according to the browser language,  or according to the specified language of the user if the application uses authentication. To configure the browser we open our Internet Explorer and choose in the menu item  Tools/Internet Options . There is a button 


where we can add the desired language to our browser. You should put the desired language at the top of the list and close all browser windows to put the changes into effect. You can now “Deploy and Run” your application and it should show in German!


In general I would recommend not to translate your application until it is pretty much finished. Otherwise you always have to keep the resource bundle files in sync.

You learned how to add a different language to your Web Dynpro application by creating a new resource bundle file. You were able to test it by changing the language setting of your browser. We did not touch the issue of messages that are used in the program code. For this you should add messages in the message editor and call the defined keys in your code instead of hard coding the strings. How to do that is explained in detail in the

SAP Netweaver Studio help

and in the Java API documentation for



Final remark

This is a workaround for version SP2 of the Netweaver Studio. In SP3 and later versions you may copy and translate the


files in the


directly because then the


files are generated for every


file. But even this should not be necessary anymore once the translation infrastructure is in place.

Assigned tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      Is there a limit to the number of languages you can add this way with SP2? I was told, that only two languages per application are possible?
      Author's profile photo Former Member
      Former Member
      No there is no limit on how many languages you can add this way.

      About the limitation of the 2 languages: In SP2 there is a project language and a generation language which can be configured independently. Maybe this is why you were under the impression only 2 languages are possible. At the moment the SP2 IDE only generates the default properties file and a properties file for a language that is configured under Menu/Window -> preference pages -> WebDynpro -> generation. Because this can be configured independently this can also have some interesting effects. If your project language differs from the generation language it can happen that no texts will appear in your views because there were no >language_abbreviation<.xlf files for that language. As far as I know from SP3 on the generation will generate language files for every language that is used in the project.