Versions Compared

Key

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

Table of Contents

...

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

...

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

...

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 ServerCustomization.
  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 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 can 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 frevvo 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 ServerCustomization for the instructions to complete.

...

Excerpt

Date, Time, and Date/Time controls are locale-aware for both parsing and format. When the Automatic format is selected, both date and time entry and display formatting will be locale-specific. The designer has the option to set a particular date or time format independent of the locale by using the date format or time format property, but this is not recommended because it is not responsive to user locale.

Here is an image of Date/Time controls with the browser language set for German and the Date/Time controls set for Automatic. Notice the date format is DD.MM.YYYY and the time format is HH:MM:

Changing the Firefox browser language setting to Lithuanian displays the dates and times using the format YYYY-MM-DD and HH:MM respectively:

The automatic locale-specific formatting and parsing for date, time, and date/time controls can be configured by manually adding the following properties in the locale properties file:

Property NamePurposeNotes
frevvo.date.formatAllows the admin to configure the locale-specific format pattern for date controls and the date portion of date/time controls.  If not set it falls back to the system default value for the locale as derived from the Java runtime.See  http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html for date and time formatting pattern rules.
frevvo.time.formatAllows the admin to configure the locale-specific format pattern for time controls and the time portion of date/time controls.  TIf not set it falls back to the system default value for the locale as derived from the Java runtime.See  http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html for date and time formatting pattern rules.

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 ServerCustomization above:

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

After replacing the /WEB-INF/data directory file with the updated one, the date will display as shown in the Firefox browser set for the German locale:

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 characters).  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 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.

For example, Let's say you add the properties below to a Chinese translation file named zh:

Code Block
frevvo.date.month.1=JaC
frevvo.date.month.2=FeC
frevvo.date.month.3=MaC
frevvo.date.month.4=ApC
frevvo.date.weekday.1=Mc
frevvo.date.weekday.2=Tc
frevvo.date.weekday.3=Wc
frevvo.date.weekday.4=Tc  

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

Notice the month is displayed as JaC and the days of the week show Mc, Tc, Wc and Tc for Sunday - Wednesday as specified by the format properties we added to the locale file. Thursday, Friday, and Saturday display in Chinese - the language setting of the browser in this example. 

Entries for the Today and Close buttons on the Date Picker are already included in the default locale file so all you need to do is add your translations for them in the locale file you are going to use. 

Internationalization of Date Picker for iOS.

The locale of the date picker on the safari browser changes with the iPhone/iPad's "Region Format" settings, not the language settings. After setting the language in iOS, set the appropriate country/region format in the iPhone general settings.

Navigate these settings to change the Country/Region Format on iOS devices: General>International>Region Format: Select the Appropriate Country.

...