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.
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.
Choose
from the top-level navigation bar.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
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
Open the resource files and translate the text within the text tags.
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 ".
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
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.
If the translation is not visible in the forms, you should delete some of the caches:
Choose
.Delete the following caches:
ca_pipeline
ca_xmlforms_renderlistitems
ca_xmlforms_showforms