Show TOC

 Internationalization and TranslationLocate this document in the navigation structure

There are various types of texts available for the interface layout of your Web application:

  • Static Texts
  • Dynamic Texts
  • Long texts

More Information:

Help Texts for Web Dynpro Applications

Static Texts

Use

In your Web applications views you can work with text literals and texts from the online text repository (OTR).

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. The OTR texts that you create are automatically translated, or are forwarded to the translation transaction (SE63)  and are entered in the translator's work list.

If necessary, you can change any OTR texts that you create later.

Features

OTR aliases are included in the View Designer for all properties of translatable text type.  (WDY_MD_TRANSLATABLE_TEXT). You can find out what these types by choosing the F4 help symbol.

  • The OTR aliases displayed for selection are always those from the current package.
  • You can create new OTR aliases.
    Caution

    Moving a component with OTR aliases from a local package to a transportable package can cause problems.

Activities

  1. In your view call the View Designer in change mode and navigate to the UI element that you want to create or use an OTR alias for.
  2. Click the  symbol in the Value field, for example, for the Text or Tooltip attribute.

    The window Text Selection appears. You will see all the OTR aliases contained in the packet that your component is also assigned to.

    1. If you want to use an existing alias, select the alias you want from the Alias Name column and choose Enter.
    2. If you want to use a new alias, enter the character string $OTR:alias name in the Value field, and choose Enter.

      If the alias does not exist, you will be asked if you want to create it. Confirm with Yes and enter a name of your choice in the next dialog box. The text length can be a maximum of 255 characters.

    3. If you have defined for the property an alias that is in a separate package and is assigned to the corresponding development object (in this case View = WDYV), you can change this alias by double-clicking on the property. The Edit window will then appear as it does when you create an alias.
  3. Choose Save.

Resetting OTR Buffers

When executing an application that uses OTR texts, some texts may not be displayed correctly even though they have been correctly translated.

  • Either no text at all is displayed, or
  • An old version of the text is displayed, or
  • A text is displayed in another language

At runtime the texts are read from a buffer that is not automatically reset when the texts are translated. In this case you can reset the OTR buffer manually by entering /$OTR in the OK code field.

Dynamic Texts

If your texts are not compiled until runtime or if they contain variables, you can use text symbols from the assistance class. For more information see Working with the Assistance Class .

Long texts

The UI element FormattedTextView is used for displaying long texts. Pay particular attention to the section Converting SAPscript Texts into Formatted Textsin the documentation for this UI element. You can find an example in the system in the Web Dynpro application WDR_TEST_MISC.

Similar to the FormattedTextView, the UI element FormattedTextEdit is provided for editing longer texts.

Note

If you want to use SE61 texts to display long texts, note that not all SAPscript properties can be implemented in Web Dynpro ABAP.

We do not recommend or support the use OTR long texts, nor their display in text view.