Applies to version 2019.1 and above; author: Jacek Język
WEBCON BPS platform allows to manage business processes in multinational and multilingual environments. Particular parts of the form were designed in such a way, that you can provide translations to any language that is used by the users while creating the workflow.
From version 2019.1.2 on multilingual choice fields are complimentary to forms created with multilingual usage in mind. This functionality allows to define choice dictionaries so that text displayed in them is coherent with language in which the form is presented to the user.
Data sources for multilingual choice fields
Handling multiple languages in forms’ choice fields requires preparing data source with which this form field will be fed. Source has to return multilingual text including already translated values.
To make it possible use a predefined format which allows to set a default name and it’s translations for specific languages.
Format in which data has to be returned by the source has following pattern:
DEFAULT_NAME$$LANG_CODE$$LANG_NAME$$ LANG_CODE $$ LANG_NAME …
$$ – parameter separator
DEFAULT_NAME – default name displayed on the form if it’s presented in a language which doesn’t have a translation defined in the source
LANG_CODE – two-letter language code (according to ISO 639-1) for which a translation is defined in the next parameter (ex: PL, EN, DE, IT)
LANG_NAME – value translation for specific language
It is possible to provide unlimited number of translations, the only limit being the column size in the database to store translatable values.
Below you can see an example of a phrase with a default value „Kolor” for which three translations were made – in English, German and Italian:
Form field configuration
Handling multilingual names was introduced for Choice field form field and for items list columns of Dropdown, Popup search window and Autocomplete types. This functionality can be used in forms of both Classic and Modern types.
For this functionality to work correctly, data sources feeding the form field need to be appropriately prepared (as in the previous description) to return translated phrases from the data source in the proper format.
Turning on „Support multi language names” option causes activation of this functionality and an appropriate display of available translation on the form in accordance with the specified presentation language.
Storing values in database
Values chosen in form fields which handle multilingual names are saved in the database. Those values are stored as text in standard format ID#NAME, however the NAME includes translations of all languages returned by the data source at the time of saving the form. This approach allows values on the form to always be displayed accordingly with presentation language. It also has some consequences which are important to remember while using the multilingual functionality:
- Limitations of the size of the data stored in the base – values of fields and choice columns saved in the database can be 1000 characters long. This limits the phrase length and the number of the translations themselves which together cannot be longer than 1000 characters.
- Translation changes in the data source are not taken into account for the saved value until the form was saved with the new translation.