Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos
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. " 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.

"

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

*" *

*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  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.

"

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).

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.

"

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.

6 Comments