Skip to Content
I was looking through the blogs and forums and could not find a good document of how to achieve Internationalization. This blog mainly discusses about how to achieve internationalization (Translate of texts). I have taken an example to demonstrate how to convert text from English to German. *Procedure* Go to Se80 and choose WebDynpro Comp/Intf . Enter Z_TRANSLATE as the component name and enter. It will ask you whether to create a new component. Click yes and enter the Description and press enter. Save it to a development Package. Right click on component and create->view. Enter View name and description and enter and save it. Drag and drop the View into the Window Right click on the RootUIElementContainer and Insert Element. Enter the name and type of UI element. Repeat the steps to insert a Input field and Button UI Elements. Go to the context tab and create an attribute *name* and bind to the input field UI element. Create an action for the button. The layout of the view will look as below. Here we have not assigned the text for label and button. image” If you use OTR texts only, you have the advantage that your Web application will be language-independent. All the texts defined in the OTR are displayed at runtime in the logon language. If the texts are not yet available in the logon language, they are displayed in the system language. Since we want to translate the texts we will create OTR text and use it for Label and Button. We can create OTR by two ways. *First Method: *

Click on the View in which you want to insert the OTR texts.

In the menu click Goto-> Online Text Repository browser.

Create an OTR text and save it in the package. See the screen shot below.

image

Here we have created two OTR Texts. Button_EN and Firstname_EN.

*image” *

*Second Method:*     We can create OTR texts by using the transaction *SOTR_EDIT.* After creating the OTR texts in any of the above methods go to the text property of the Label click image symbol. You can see the OTR texts created by us. Select the text you want to place it in the text property. Once you select the OTR text the text property will be filled with OTR text like *$OTR:Aliasname. *See the screen shot below.

image

Repeat the same step for Button text Property.

Now Right click on the component and create an application. Save and Activate the Component.

Right click in the application and click Test. The application will run in the browser and the output will be as below. These output is with logon language English(EN).

image

OTR text saved in $TMP (Local object) will not be transported. So always store OTR texts in a package.

To translate the OTR text follow the below procedure

 

We can translate the component Description, view description by going to the transaction SE63.

Translate->ABAPObjects->short texts. See the below screen shot.

image

Select WebDynpro and click enter.

Enter the name of the component, choose the source lang and target lang and click enter. You can see the below screen.

image

To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

    1. Rene Guenther
      sorry, please replace “to create a web dynpro application” with “to use the function module”.

      Still, creating a user-friendly application would probably be worth the effort if you have a lot of texts to translate.

      (0) 
      1. Gopi Nidjelli Post author
        “sorry, please replace “to create a web dynpro application” with “to use the function module”.”

        I am sorry i could not understand your comment. Can you brief me please.

        Thanks,
        Gopi

        (0) 
        1. Rene Guenther
          Sorry for the confusion:

          In my first comment I wrote:
          “While trying to translate with SOTR_EDIT my colleague found another solution which doesnt require to create a web dynpro application.”

          I wanted to write:
          “While trying to translate with SOTR_EDIT my colleague found another solution which doesnt require to use a function module.”

          I wanted to edit my comment, but it is not possible.

          (0) 
  1. Karri Kemppi
    Thanks for sharing this trick. Is there an easy way to transport the translations made in the way you mention in the blog? At least I didn’t get the pop-up for creating new transport request. And the objects didn’t seem to include themselves into any existing transport request either.
    (0) 

Leave a Reply