Entering content frame

Procedure documentation Changing Labels for Properties Locate the document in its SAP Library structure

Use

The use of bundle files allows you to modify labels as well as localize the language.

The following example shows how to use targeted labels for particular languages and how to swap the English label Read only of the property cm_readonly with the label Write protected.

 

Prerequisites

You have worked through the steps that are described in the section Importing an Example Project Into SAP NetWeaver Developer Studio.

 

Procedure

 

...

       1.      In SAP NetWeaver Developer Studio, create a bundle file for each language. Note the following conventions:

<bundle file name>_<language>.properties

For example:

my-labels_de.properties

my-labels_es.properties

You also need a bundle file for the default language (usually English).

my-labels.properties

 

       2.      Create entries for the labels of properties in these files. The entries must have the form key=label.

 

Note

You can find the keys of existing properties in the configuration (parameter Key for Label).

 

For example:

For the German bundle file my-labels_de.properties:

cm_readonly=Schreibgesch\u00FCtzt

For the Spanish bundle file my-labels_es.properties:

cm_readonly=Solo lectura

For the default bundle file my-labels.properties:

cm_readonly=Write protected

 

Note

Remember to use Unicode notation for umlauts and special characters. Below are some examples for German umlauts:

\u00E4 =ä

\u00C4 =Ä

\u00DF =ß

\u00F6 =ö

\u00D6 =Ö

\u00FC =ü

\u00DC =Ü

 

       3.      Export and deploy the PAR file that contains the bundle files (see Exporting and Deploying PAR Files).

 

       4.      In the Configuration iView in the portal, create a new metadata extension under Content Management ® Global Services ® Property Metadata ® Metadata Extensions.

For example, my_metadata_extension.

Enter the name of the bundle file from step one with the package structure, but without the extension:

For example, Bundle File = com.<%your company name%>.km.resource.bundle.my-labels

 

       5.      Call up the configuration of the property (for example, cm_readonly) under Content Management ® Global Services ® Property Metadata ® Properties.

In the parameter Metadata Extension, choose the metadata extension that you created in step 5, and save it.

For example, Metadata Extension = my_metadata_extension.

 

Result

The label for the command is now displayed in the portal language on the interface. If no bundle file exists for the language set, the label is displayed in the language of the default bundle file (English).

 

 

Leaving content frame