onPhase Forms latest - This documentation is for onPhase Forms v11.3. Not for you? Earlier documentation is available too.
Multi Language Support
- 1 Overview
- 2 Locale Handling
- 3 Translating Your Form
- 4 Server Customization
- 5 International Characters for PDFs
- 6 Internationalization of the Task List / Workflow Designer
- 7 Switch Form Language
Overview
The internationalization feature enables you to easily localize your forms for target audiences that vary in culture, region, and language. frevvo supports all ISO 639-2 languages worldwide including RTL (right-to-left) languages. The list of available languages and locale codes can be Adding Locales in your instance of frevvo (On Premise only). Translations use UTF-8 encoding by default, but you may also upload ISO 8859-1 (Unicode) strings.
Locale Handling
frevvo supports localization from the browser's locale setting. frevvo will recognize the browser locale and alter displays and input formats as well as language according to the user's setting. Setting this preference is browser-specific. Refer to the www.w3.org Internationalization website for information about language preferences and how to change those in a number of popular browsers. Here is an example using the Firefox browser:
To change your language preferences in the Firefox browser:
Click on the File menu, then select Options
Click the Content tab and then click the Choose button in the Language section.
Click on the dropdown arrow to select the preferred language from a long list of choices.
Click the Add button to add the selection to the list and then use the Move Up and Move Down buttons to modify the order of preference. Click OK to save your selections.
You can select a general language code or a language/country code. The image above shows the choices for Spanish, Spanish/Mexico, Spanish/Chile, and Spanish/Paraguay, which appear in the Firefox Language list. Notice the list of languages in the Firefox browser uses the ISO 639-1 two-character language codes and two-character country codes for most of the choices. This may not be the case for other browsers.
Locale URL Parameter
You can override the browser locale with the special frevvo locale URL parameter. This is often very useful for testing your language-specific localizations. The locale parameter is of the form ISO_639_2_CODE | ISO_639_1_CODE [ _ISO_3166_1_CODE ] - where:
ISO 639-2 Code - The 3-letter ISO 639-2 languages code or ISO 639-1 Code - The 2-letter ISO 639-1 languages code. Either one or the other is required.
ISO 3166-1 Code - The 2 letter ISO 3166 alpha 2 country code. This is Optional.
For example, the ISO 639-2 three-character code for English is 'eng'. The ISO 639-2 two-character code for English is 'en'. The ISO 3166-1 country code for English in the United States is 'US'. You can append eng_US or en_US as your locale to specify English in the United States.
Here is another example where the Firefox browser is set for the German language and the form's share URL has the &locale parameter equal to the ISO 639-2 three-character code for Spanish appended to it. The appended &locale parameter will override the browser language setting of German and display the form in Spanish (provided the appropriate translation files have been uploaded to frevvo). Locale names are case-sensitive.
https://app.frevvo.com/frevvo/web/tn/frevvodocs/u/e1dd0efb-f368-4e60-937a-fe08849485d5/app/_2oWtYWSkEeu7yproembD1w/formtype/_nM_xMPU0EeuztqyQmKh8FQ/popupform?locale=spaThere is a built-in locale method in frevvo that you can use in a Business Rule. This method returns the locale from the browser URL.
Translating Your Form
You can easily localize any form by clicking Upload Translation in the form's Action Menu on the Forms & Workflows Home Page. This opens the Multi-Language Support home page for that form. The default locale is the original language you used in the form designer. Each new locale you create will appear on this page. In the example below this form was translated to Spanish.
The steps below describe the process of creating, testing, and using a Spanish locale translation for a form named Travel Request Form.
Download and Translate
Click the download
icon to download the default locale. Save the file named TravelRequestForm_default.properties to your disk
Rename this file to your locale language. Though this is not required it is helpful so you will later know which translation this file contains. In this example, we renamed the file to: TravelRequestForm_spanish.properties
Edit TravelRequestForm_spanish.properties in a simple editor like Wordpad on Windows
Here is an example locale properties translation file. This form contains several controls labeled in English. Also, you will always see the labels for the submit button and the save, load, and print icons. These can be localized too. In this example, only the field labels were translated.
# Default strings for formtype: Travel Request Form
# Note that spaces in keys must be properly escaped with a '\'
# Generated on: Wed Jul 15 21:49:45 EDT 2009
Buiness\ Purpose=Negocio Propósito
Car\ class="Coche" Clase
Departure\ Date=Salida Fecha
Departure\ Time=Salida Tiempo
EMail\ Address=Correo Electrónico
Submit=
load=
print=
save= You will see a line for every control label in your form, message control text (if Save Value is checked), hint, help, etc. in the format:
<Text String>=
Add translations for each text string to the right of the equal sign:
<Text String>=<Text String in Spanish>
For example:
First\ Name=Primero Nombre
Notice that the strings on the left side of the '=' have spaces escaped with the '\' character. This is needed so do not remove that. The escape character is not needed on the right side of the '='. The above example has "First\ Name" on the left and "Primero Nombre" on the right.
If you have a label that contains a colon, it must be escaped in the default translation file. Newly downloaded default translation files properly escape a colon with a '\'. Translation files with strings containing colons will have to be re-uploaded with the colon properly escaped.
You may find some strings in the default properties file that are not applicable to your form. Here are a few example strings that are only applicable if you're using the save/load feature or Electronic Signatures.
Save\ failed.\ Status=
Save\ successful=
Save\ this\ form=
Saving=
Section\ A=
Sign\ this\ section=
load=
save=Text strings inside of controls, such as the Add Files text in the Upload control are also translated using these files.
Some text editors cannot display all international characters in their default encoding setting. For example, if you add Arabic translations in a text file and try to save, you may see an error like "WARNING: Some characters cannot be converted to code page 1252 (ANSI - Latin I)". To resolve this, use the Save As function and change the encoding to UTF-8.
Translation Considerations
Some browsers have problems with apostrophe characters. To ensure that your translations are ok on all browsers you should use the HTML escape character in place of the apostrophe. Refer to this additional information describing HTML Reserved Characters.
# If this does not work in your browser: Initializing\ form=l'initialisation de la forme # Instead use the html apostrophe escape sequence like this Initializing\ form=l'initialisation de la formeCheck the 'Save Value' property for Message controls that you will want to translate.
Messages formatted in HTML that contain newline characters in the text may not translate properly. For Example, the Text "Trip Itinerary <br/> Please Complete" in a message control to label the Trip Itinerary section of the Travel Request form will appear on the screen to have a new line in it. New Lines are ignored by HTML. Do not use newlines in forms that require localization.
Use English alphabet characters only when naming controls. For example, controls named with ó as in Póliza may cause issues when the control is used in a business rule and with submission data.
The frevvo Preview and Test functions display in the default locale. This is as designed. Go to the Multi-Language Support (Upload Translation) page to test the use mode form in the target locale/language.
Be careful when internationalizing markup. Do not assume that the string property name is valid markup. For Example: Let's say you had a field called FirstName in your form with this styling applied to the label: <span style="color:red;font-weight:bold;">FirstName</span>. The default strings properties file shows the property name as: <span\ style"color:red;font-weight:bold;">FirstName</span>. It is missing the '=' after style. This is intentionally stripped out because otherwise if it was left in, the = would be interpreted as the end of the property name. Adding <span style="color:red;font-weight:bold;">Primero Nombre</span> to the right side of the "=" sign, in this case, will translate this label successfully. If you see the error message " Failed to generate PDF snapshot: Could not generate PDF", or if the PDF prints with the HTML code instead of the expected formatted text, check the markup in your translation files.
Buttons in the frevvo UI, such as "Set" in the Visual Rule Builder or "Log In" in the Form/Workflow Settings Document Action tab, may not resize to fit translated text that has more characters than the original text. In this scenario, consider using a different label or abbreviating to ensure the text fits neatly.