Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

  

Section


Column
 

The internationalization feature enables you to easily localize your forms for target audiences that vary in culture, region and language.  supports  frevvo supports all ISO 639-2 languages worldwide including RTL (right-to-left) languages. The list of available languages and locale codes can be configured AddingLocales in your instance of  of frevvo (In-house only). Translations use UTF-8 encoding by default but you may also upload ISO 8859-1 (Unicode) strings.


Column
width350px

On this page:

Table of Contents
maxLevel2
 


Locale Handling

 supports frevvo supports localization from the browser's locale setting.  will  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 this 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:

...

The browser locale may be overridden using the special  locale 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:

...

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 to frevvo.  Locale Names are case sensitive. 

...

There is a built-in locale method in  that  in frevvo that you can use in a Business Rule. This method returns the locale from the browser URL.

...

Info
  • 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 example above correctly 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 in the default translation files. 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, workflows feature or Electronic Signatures.

...

  • 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.

    Code Block
    # 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 forme 


  • Check the 'Save Value' property for Message controls that you will want to translate.
  • Messages formatted in HTML that contain new line 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 new lines 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  Preview frevvo Preview function displays in the default locale. This is as designed. Go to the existing internationalize 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" check the markup in your translation files.
  • Buttons in the  UIthe frevvo UI, such as "Set" in the Visual Rule Builder or "Log In" in the Form/Flow Properties Document Action tab, may not resize to fit translated text that has more characters than original text. In this scenario, consider using a different label or abbreviating to ensure text fits neatly.

...

  1. Choose the locale from the dropdown. In this example we choose Spanish. Note the list of available locales is configured by your  system your frevvo system administrator (In-house only).

    Note

    Creole, Hatian (Creole) and Somali.locale options have been added to this dropdown in the frevvo Cloud in a subsequent upgrade.


  2. Browse to your translation file - TravelRequestForm_spanish.properties on disk
  3. Click the upload button. You will see the new locale appear in the list above. In this case named Spanish::locale=spa
  4. Click the test  icon to view the form with your translation to this new language.

The important point to note is that the &locale=spa URL parameter is directing the  server the frevvo server to translate your form into Spanish. The test button and the share button here on the Locale Home Page do that for you automatically. The test & share buttons on the Forms and Workflows Home Page do not set the locale URL parameter and thus revert to the browser's default locale.

...

Translations use UTF-8 encoding by default but you may also upload ISO 8859-1 (Unicode) strings. If you are using Unicode, check the ISO checkbox above the upload button. 

Error message strings that the designer adds to a form using the error message property are translated using these uploaded translation files. The translation of  built-in error messagesfrevvo ServerCustomization is done in the translation file located in the <frevvo-home>/tomcat/webapps/frevvo directory.  

Note
You can only specify one translation per language. For example, if a browser locale is set to ger (German) or de-at (German/Austria), your form will be translated using the one german translation you uploaded.

If you click the test button you'll see the URL with &locale=ger and you'll see your form translated to your german strings. And if you manually change the URL to &locale=de_at you will still see your german strings. frevvo falls back to the single german translation file.

...

To update an existing locale translation, edit the downloaded .properties file and re-upload it choosing the same locale name from the Choose Locale dropdown. This will replace the existing translation with the new translation.

Using

will frevvo will recognize the browser locale and alter displays and input formats as well as language according to the user's browser setting. Refer to browser Locale Handling LocaleHandling for the details. You can override the browser's locale setting via the form's locale URL parameter which is typically only done for testing your translations. For example to render the form in Spanish rather than the default browser locale, add &locale=spa to the form Url. The test button and the share button on the Locale Home Page do that for you automatically. The test & share buttons on the Forms Home Page do not set the locale parameter and thus use the browser's default locale setting.

Server Customization

 Infrevvo In-house supports the ability to customize runtime and design time strings and add additional locales and RTL languages. To make any of these changes to your In-house  server frevvo server you must follow these steps:

  1. Stop the  serverfrevvo server
  2. Open the directory <frevvo-home>/tomcat/webapps/frevvo.
  3. Copy the /WEB-INF/data directory to a temporary location.
  4. Modify the files in /WEB-INF/data as described in the topics Adding Locales, Runtime Strings and Design-Time Strings below. These files contain all of the strings that have been externalized as well as the list of supported locales and directions.
  5. Replace the /WEB-INF/data directory with your modified version.
  6. Re-start your  serverfrevvo server.

Adding Locales

To add new locale codes to the Choose Locale dropdown and add/change which locales are right to left languages, update these two properties files located in the /Web-INF/data/users directory in the <frevvo-home>/tomcat/webapps/frevvo directory

...

Runtime strings such as those found when a user logs in to access their task list, the login page, access denied messages, etc and Design-time strings such as those found in the palette controls, wizards, built-in error messages etc. are localized in the default file in the WEB-INF/data/locale directory.

Follow these steps:

  1. Refer to steps 1 and 2 above under Server Customization ServerCustomization, then...
  2. Find the file named "default" located in /WEB-INF/data/locales. This file contains all of the runtime and designer strings that have been externalized. Notice there are partially completed Chinese and German sample translation files provided in this directory as well.
  3. Copy the file "default" to a new file named using the ISO 639-2 three character or the the ISO 639-1 two character language codes .For example, the German translation file can be called ger or de, for English you can use eng or en. The Portuguese translation file can be named por or pt and the Chinese translation file an be chi or zh.  

    Tip

    Translation files can also be named to specify a country code. In this case you must name the file using this format: <language code>_<country code>. For Example, let's say the Firefox browser is set for de-at (German/Austria). The translation file in the Webfrevvo Web_INF/data/locales directory MUST be named de_AT. The de represents the german language, followed by the underscore followed by a capitol AT which is the country code for Austria. These file names are case sensitive.


  4. There are several files for specific areas of the application. The names of these files indicate the area for which the file contains externalized text strings:

    • form-designer-properties

    • flow-designer-properties

    • flow-designer-step-properties

    • rule-builder (includes javascript rule validation hints)

    • frevvo-ui (currently covers the template install dialog)

  5. Pre-pended the locale onto the file. For example for french, "form-designer-properties" becomes "fr-form-designer-properties". All 6 files are required for each locale in order for this to work properly. For example for french (fr), you must place the following files into WEB-INF/data/locales, even if not all of them are translated:

    • fr

    • fr-form-designer-properties

    • fr-flow-designer-properties

    • fr-flow-designer-step-properties

    • fr-rule-builder

    • fr-frevvo-ui

  6. Edit the new language file and add your translations.
  7. Refer back to steps 4 - 6 under Server Customization ServerCustomization for the instructions to complete.

...

Setting the Firefox browser language to Chinese displays the designer palette controls as shown:

 
 

 will frevvo will detect the language setting of the browser and search for a corresponding ISO named translation file in the WEB-INF/data/locale directory . If a translation file exists, the designer and server-wide runtime strings display with the translations specified in this file. If the translation file does not exist, the designer and server wide runtime strings display in English - the language of the default translation file. If a locale specific file does not contain a particular property or string, then the English translation in the default file is used.

When you first examine the locale directory, you will notice a sample translation file named ger (German). Let's say you copy/modify the default translation file to make a second file for German named with the ISO 639-1 two character code - de. Then you create/modify another German translation file and name it de_AT for German/Austria. 

Select German/Austria (de-at) as the language in the Firefox browser and log into into frevvo as a designer user. The designer displays the translations from the de_AT file. If thee de_AT translation file was not present in the WEB-INF/data/locale directory, the designer and server-wide runtime strings display the translations specified in the ger (German) file. If the ger file was not present in the locale directory, the translations in the default file (English) would be used.

To display the designer and server-wide runtime strings using the translations from the de (German) file, you would have to change the language in the browser to German (de).

ISO 8559-1 Unicode Characters

There are two options for the runtime and design-time translation strings.

  1. UTF-8 encoded language files named with ISO language codes without any extension. Examples would be spa, ger, de, es, de_AT etc
  2. Unicode versions using the same name but with an extension of .unicode. For example, the French unicode language file would be named fre.unicode. This file must contain the unicode equivalent for any international characters that cannot be properly represented in the UTF-8 language file. Some examples are shown in the image:

For example, let's say you are translating the designer to Spanish (es) and the Spanish word for the video control is vídeo.

  1. Follow the steps above CreatingRuntimeandDesign-TimeTranslations to copy the default properties language file to make the spa.unicode file.
  2. Provide the translations.
  3. To properly represent the Ã, you must provide it's unicode equivalent. You can use a tool such as native2ascii which is included in the JDK to convert the international characters to their unicode equivalents. Be sure to save the file with UTF-8 encoding before running the conversion.
  4. Or you can manually encode international characters by replacing it with \uxxxx where the xxxx is the 4 digit hex value for the unicode character.
  5. Refer back to steps 4 - 6 under Server CustomizationServerCustomization for the instructions to complete.

Here is what the Video control looks like in the designer if the entry in the spa.unicode file for the Spanish word for video contains the unicode equivalent for the à (\u00e). The language of the browser is set to Spanish (es - if using Firefox):

The UTF-8 and unicode files for a language must reside in the <frevvo-home>/tomcat/webapps/locale directory. You can mix the two different file types with regards to different languages. For a particular language/locale, the system will try to load the UTF-8 version first.

Testing Runtime and Design-Time Translations

Runtime Translations:

Test that your Runtime string translations show up as expected, for example on your Task list by:

  1. Get the share Url to your task list
  2. In another browser window/tab, paste the url and append "&locale=yyy" where yyy is the target language code and the name of the target language file that was added to the war file.
Code Block
http://localhost:8082/frevvo/web/tn/nancy.com/subject/designer/tasks?submissionState=PENDING?embed=&locale=spa

If you append &locale=spa to the task list as a test as discussed above you will notice that that frevvo' surrounding s surrounding page content is visible (as expected) and is not localized. This is correct and expected behavior. You are expected to embed the task list in your own localized web site.  

Design Time Translations: 

Test that your designer translations show up as expected by:

  1. Set LocaleHandling your browser to the target language.
  2. Login to the  as frevvo as a designer user. 
  3. Edit a form to verify the designer strings are translated to the language specified by the language file that was added to the war file. An example is shown in Chinese translation example above.

...

Date and time type controls are locale parsing and formatting aware. When Automatic format is selected, both date and time entry and display formatting  will be locale specific.The designer has the option to force a particular date or time format upon the users that is independent of the locale by using the date format and time format properties. but this is not recommended.

...

For example, let's say you want to change the MM.DD.YYYY to display as "Day of the week, Month Day ,year" in the German locale. Simply add the following to the ger locale file located in the WEB-INF/data/locale directory as explained above ServerCustomization:

Code Block
frevvo.date.format="EEE, MMM d, ''yy"

...

Tip

To translate AM and PM in time / date-time control formats, assign the value "h:mm a" to the frevvo.time.format property in the concerned locale file.

Date Picker

The Date picker will be automatically translated according to the browser locale. You can override the browser setting by adding the properties shown below to the locale file. This localization only applies to the date picker on the desktop as the native date picker will be shown on mobile devices. You can translate  (locale-specific) month names and abbreviated day of week names (two character).  The days of the week will always be shown as Sunday through Saturday, left to right on the date picker.  Only the Gregorian calendar system is supported.

To localize the date picker on the desktop, manually add the following properties in the appropriate locale properties file in the WEB-INF/data/locale directory as explained above ServerCustomization.

Property NamePurpose
frevvo.date.month.1Allows the admin to override the locale specific short name for the 1st month of the year (January).  This overrides the system default value for the locale as derived from the Java runtime.
frevvo.date.month.2Allows the admin to override the locale specific short name for the 2nd month of the year (February).  This overrides the system default value for the locale as derived from the Java runtime.
frevvo.date.month.3Allows the admin to override the locale specific short name for the 3rd month of the year (March).  This overrides the system default value for the locale as derived from the Java runtime.
frevvo.date.month.4Allows the admin to override the locale specific short name for the 4th month of the year (April).  This overrides the system default value for the locale as derived from the Java runtime.
frevvo.date.month.5Allows the admin to override the locale specific short name for the 5th month of the year (May).  This overrides the system default value for the locale as derived from the Java runtime.
frevvo.date.month.6Allows the admin to override the locale specific short name for the 6th month of the year (June).  This overrides the system default value for the locale as derived from the Java runtime.
frevvo.date.month.7Allows the admin to override the locale specific short name for the 7th month of the year (July).  This overrides the system default value for the locale as derived from the Java runtime.
frevvo.date.month.8Allows the admin to override the locale specific short name for the 8th month of the year (Aug).  This overrides the system default value for the locale as derived from the Java runtime.
frevvo.date.month.9Allows the admin to override the locale specific short name for the 9th month of the year (Sept).  This overrides the system default value for the locale as derived from the Java runtime.
frevvo.date.month.10Allows the admin to override the locale specific short name for the 10th month of the year (Oct).  This overrides the system default value for the locale as derived from the Java runtime.
frevvo.date.month.11Allows the admin to override the locale specific short name for the 11th month of the year (Nov).  This overrides the system default value for the locale as derived from the Java runtime.
frevvo.date.month.12Allows the admin to override the locale specific short name for the 12th month of the year (Dec).  This overrides the system default value for the locale as derived from the Java runtime.
frevvo.date.weekday.1Allows the admin to override the locale specific short name for the 1st day of the week (Sunday).  This overrides the system default value for the locale as derived from the Java runtime.
frevvo.date.weekday.2Allows the admin to override the locale specific short name for the 2nd day of the week (Monday).  This overrides the system default value for the locale as derived from the Java runtime.
frevvo.date.weekday.3Allows the admin to override the locale specific short name for the 3rd day of the week (Tuesday).  This overrides the system default value for the locale as derived from the Java runtime.
frevvo.date.weekday.4Allows the admin to override the locale specific short name for the 4th day of the week (Wednesday).  This overrides the system default value for the locale as derived from the Java runtime.
frevvo.date.weekday.5Allows the admin to override the locale specific short name for the 5th day of the week (Thur).  This overrides the system default value for the locale as derived from the Java runtime.
frevvo.date.weekday.6Allows the admin to override the locale specific short name for the 6th day of the week (Fri).  This overrides the system default value for the locale as derived from the Java runtime.
frevvo.date.weekday.7Allows the admin to override the locale specific short name for the 7th day of the week (Saturday).  This overrides the system default value for the locale as derived from the Java runtime.

...

After replacing the modified /WEB-INF/data directory file, restarting  and restarting frevvo and setting the Firefox browser to Chinese - zh, the date picker will display as shown in the image:

...

You can add support for International characters for a form's Print view and submission PDFs by adding unicode fonts with broad language support to the  war the frevvo war file. Refer to this documentation for the details.

...