Start of Content Area

Background documentation Search Process for Determining the Required Resource Bundle  Locate the document in its SAP Library structure

A resource bundle consists of a set of properties files that contain language-specific keys/value pairs. Each properties file in the resource bundle has a shared name (see Creating Language-Dependent Resources at Design Time) and the respective language key. The following naming convention is used for a Web Dynpro application: Resource+<Web Dynpro component name>_<language key>_<country>.properties.

At runtime, the relevant properties file is loaded dynamically, depending on the language ID of the current user. If the Web Dynpro application requires user authentication, the language indicator is determined through the data of the user who is logged on. If the Web Dynpro application does not require user authentication, the language key of the used browser is used for the selection of the properties file.

Search Process

Web Dynpro determines the language used for each application instance in accordance with the following rules:

...

·        With user authentication
In the case of applications that require a user logon (that is, authentication), Web Dynpro uses the language that is assigned to this user as the language indicator.

·        Without user authentication
If the Web Dynpro application does not require a user authentication, the language key that is used for the selection of the properties file is:

¡        the indicator of the portal – provided the Web Dynpro application runs in the portal.

¡        the indicator of the browser used – provided the Web Dynpro application does not run in the portal.

The search for the required properties file is done in accordance with the standard mechanisms for Java resource bundles through the suffixes of the properties files. This means that the text search is begun in the properties file using the determined language indicator for the language indicator of the Web browser. If the search is unsuccessful, the properties file with the default language indicator of the started Web Dynpro application is searched for. Afterwards, the properties file with the default language indicator of the system used and the properties file with the default language indicator of the Java Virtual Machine are searched for. If this search is still unsuccessful, the search for the properties file without language indicator is terminated – that is, the search order is as follows:

       1.      Resource+<Web Dynpro component name> or simpleTypesResource+”_”+<language indicator of the Web browser>

       2.      Resource+<Web Dynpro component name> or simpleTypesResource+”_”+<language indicator of the Web Dynpro application>

       3.      Resource+<Web Dynpro component name> or simpleTypesResource+”_”+<language indicator of the system used>

       4.      Resource+<Web Dynpro component name> or simpleTypesResource+”_”+<default language indicator of the Java Virtual Machine>

       5.      Resource+<Web Dynpro component name> or simpleTypesResource

Example

The following table shows the search order for different language indicators:

User

Language indicator of the user

Language preference of the browser

Language indicator of the Web Dynpro Application

Language preference of the system

Language preference of the JVM

Language indicator

used

Authenticated user

de

en

fr

it

ru

de

Anonymous user

-

en

fr

it

ru

en

Anonymous user

-

-

fr

it

ru

fr

Anonymous user

-

-

-

it

ru

it

Anonymous user

-

-

-

-

ru

ru

 

Determining the Language Indicator for JCo Links

The system variable SY-LANGU for the language in an ABAP-based SAP system is determined from the language that is linked to the JCo connection.

The language that is linked with the JCo connection is determined in different ways:

·        If the JCo connection has been set up manually through API at run time, then – as a rule – the language that was specified when the JCo client was created is used.

Caution
This procedure should only be used in exceptional cases.

·        If the JCo connection was created in the Web Dynpro Content Administrator using DefinedUser, then – as a rule - the configured language in the JCo destination is used, irrespective of the language of the user currently logged on. It is also possible to not define any language; in this case, the current language of the user or the application is determined at runtime.

·        If the JCo destination was created in the Web Dynpro Content Administrator using SSOUser or SNCUser , then – as a rule – the language of the current user will be used. This is specified in the User Management logon screen when the user is registered. This procedure is generally used by applications in productive operation that required authentication.

  

  

 

End of Content Area