Show TOC

Providing Forms in Multiple LanguagesLocate this document in the navigation structure

Context

To provide forms in multiple languages, you create language-dependent resource files.

Follow the procedure below to translate texts in the actual forms, not in the content.

Default Resource File

When you generate a project, the system creates the following default resource file:

<Preferences location>/<project name>/<project name>.xml

This resource file contains the text that you enter in the Caption property of label controls and other controls.

Example

For example, the system has generated the following default resource file for the Demo News project:

/etc/xmlforms/SAP_DemoNews/SAP_DemoNews.xml

The system uses the default resource file if no language-dependent resource file is available in the language of the logged on user.

Procedure


  1. Choose Start of the navigation path Content Administration Next navigation step KM Content  End of the navigation path from the top-level navigation bar.

  2. In the project folder, create language-specific and/or country-specific resource files.

    Use the default resource file for your project as a template.

    Use the following naming conventions:

    <preferences_location>/<project_name>/<project_name>__<language_key>.xml

    <preferences_location>/<project_name>/<project_name>__<language_key>__<country_code>.xml

    Example

    Examples:

    Resource file for Italian:

    /etc/xmlforms/SAP_DemoNews/SAP_DemoNews__it.xml

    Resource files for English (United States) and English (United Kingdom):

    etc/xmlforms/SAP_DemoNews/SAP_DemoNews__en__us.xml

    etc/xmlforms/SAP_DemoNews/SAP_DemoNews__en__gb.xml

  3. Open the resource files and translate the text within the text tags.

    Example

    For example:

    <TEXT AKEY="lbl_1016189257907" LENGTH="0" TYPE="XFLD">Create or Edit a News Item</TEXT>

    In this line, you would only translate the text " Create or Edit a News Item ".

  4. If you make further changes to the forms following this translation process, decide whether you want the system to regenerate the language-dependent resource files.

    To do this, choose Start of the navigation path Options  Next navigation step  Project  Next navigation step  Update Language-Dependent Resource Files  End of the navigation path in the XML Forms Builder.

    • Active : The system regenerates existing language-dependent resource files. Texts whose keys were already available in the resource file remain unchanged - your translations are not lost. New texts appear in the original language, and you can translate them later on.

    • Inactive : The system only regenerates the default resource file, and leaves any language-dependent resource files unchanged. If you created new texts, the system does not display them to users logged on in different languages.

      Note

      If the translation is not visible in the forms, you should delete some of the caches:

      Choose Start of the navigation path System Administration  Next navigation step Monitoring  Next navigation step  Knowledge Management  Next navigation step  Cache Monitor End of the navigation path.

      Delete the following caches:

      • ca_pipeline

      • ca_xmlforms_renderlistitems

      • ca_xmlforms_showforms