Show TOC

Using Language Resource FilesLocate this document in the navigation structure

Use

If you want to use a single set of HTML templates for all supported languages, you can use language resource files.

In this case, you create a separate language resource file for each language. Language resource files are stored with the HTML templates, and named according to the following convention:

<service>_<language>.htrc

For example, ECS3_EN.htrc

The language resource files for a service must be stored in the same directory as the HTML templates:

...\ 2.0\<virtual-ITS> \Templates\Service

For example, C:\Program Files\SAP\ITS\2.0\<virtual-ITS>\Templates\ECS3.

If you use language resource files, the naming conventions for HTML templates are slightly different. In this case, you must omit the language indicator from the file name, otherwise the HTML templates are not recognized. The naming convention is thus:

<module pool>_<screen number>.html

Example

Instead of using the language-specific templates

saplec30_1000_d.html

saplec30_1000_e.html

saplec30_2000_d.html

saplec30_2000_e.html

you could implement just two templates and two language resource files:

saplec30_1000.html

saplec30_2000.html

ecs3_d.htrc

ecs3_e.htrc

Language Resource File Structure

A language resource file consists of a number of resource keys, each with a name and value. The name is a placeholder string, and the value is the translation for the key into the given language.

You use the resource key as a placeholder in an HTML template to specify where the translated text (the resource value) should be inserted at runtime.

Example

A language resource file for German could contain a number of keys, as shown in the following table:

Key

Text

Title

Statusabfrage fuer Bestellungen [Ask for order status]

Ok

OK

Cancel

Abbrechen [Cancel]

Exit

Beenden [Exit]

4711

Sind Sie sicher? [Are you sure?]

#4712

Diesen Key gibt es nicht! [This key does not exist!]

frontcolor

0x000000

backcolor

0xffffff

Using Resource Keys

In an HTML template, you can use resource keys wherever an HTMLBusiness constant can be used. Each resource key must be preceded by the hash symbol:

Example

<html>

<head>

<title>`#title`</title>

</head>

<body bgcolor="`#backcolor`" text="`#frontcolor`">

<form action="`wgateURL()`" method="post">

...

<input type=submit name="~OkCode=/00" value=" `#ok` ">

<input type=submit name="~OkCode=/NEX" value=" `#exit`">

</form>

</body>

</html>