Localize Forms
- Last UpdatedNov 15, 2023
- 2 minute read
Localize forms to make it usable with a specific language, script, and culture by localizing controls, standard validation messages, and messages in validation scripts.
Workflow Management Forms provides two types of localization in Enterprise Console.
-
Design time localization
-
Run time localization
Design time localization
Design time localization happens when a form is published. At the time of publishing a form, the Forms Engine will find all the keys (prefixed and suffixed with @@, for example @@entity@@) mentioned inside the form (either in the properties like tag name or button text or in the script) and replace the values from the text files inside <AVEVA Work Tasks Install Path>\Locales\<culture>\Forms2 folder including subfolders.
AVEVA Work Tasks saves the localized View Model Object in the database. When you open/render a form, it will be loaded from the View Model Object (except when preview). This means that any changes made in the locale files after the form is published will not reflect until the respective forms are republished.
Run time localization
Run time localization happens when a form is loaded either from Navigation Link, Pop-Up form, or is rendered in HTML page. The Forms Engine will load all the key value pairs from all the text files inside <AVEVA Work Tasks Install Path>\Locales\<culture>\Forms2\Standard folder at client side.
To find the value of a key, use the skelta.localize.getString() API.
The keys mentioned with @@ will be localized at the time of publishing of the form. At client side, skelta.localize.getString() can be used for run time localization.
-
Changing the key/value pair for design time localization will need all the dependent forms to be republished.
-
Design time localization is faster than run time localization.