Language preference utilities

Feedback > Surveying > Inviting > Language Prefs. Utils.

There are two utilities that assist with creating Language preferences and setting country codes in Unit groups:

  • AutoLangPref — Creates one or more Language Preferences for a single group of preferences, including automatically setting the Priority values and defining the Condition expressions.
  • AutoUnitGroupLanguage — Sets the value of a Unit Group Data Field in a Unit group to be the country code that matches the Name of the same group.

To use these utilities:

  1. Select the utility in the list.
  2. Enter the specifications.
  3. Check Confirm to run the utility. Note that the Save button has no affect on this screen.

AutoLangPref

Creates one or more Language preferences for a single group of preferences, including automatically setting the Priority values and defining the Condition expressions.

StartPri
Priority value to assign to the first preference. Each language preference is incremented by 100.
Group
Name of the language preference Group.
Field
The field to use in the language preference Condition expression.
Lang Pref

One or more Language Preference language(s) and associated country or countries. Each specification is a line in the field in this format: LANG1/LANG2|COUNTRY1,COUNTRY2. For example:

dan|dnk,grldeu|aus,deu,lie,rounld/fra/deu|bel

For the language, use the two or three-character ISO-639 code. For the country, use the ISO-31666-1 two or three-character code.

Tip: Generally, it is best to use the three-character code because some two-character codes have conflicts. For example, always use DAN for Danish because DA is problematic.
Auto language prefs & Confirm

Button to create the language preferences.

Note that the Save button has no effect.

This example creates three Language Preferences in a Group called Unit, and the first preference has 1000 for its Priority.

A LangPref Util that defines three prefs: dan|dnk,grl; deu|aus,deu,lie,rou; and nld|fra/deu|bel; and the matching Language Pref for dan - Unit

AutoUnitGroupLanguage

Sets the value of a Unit Group Data Field in a Unit Group to be the country code that matches the Name of the same group. For example, when the group the is Jamaica, this utility sets the specified field value to JM, in this case Location (ug_location) is the target field.

Group Jamaica with Kind=COUNTRYSTATE and Location=JM

This utility only updates Unit groups whose Kind value is COUNTRYSTATE.

Field

Name (Translation Explanation) of the Unit Group Data Field that contains the ISO-3166-1 country code. In this example, to update the Location field, use ug_location for the Field value.

Location is the selected group data field, and shows the TranslationExplanation=ug_location

Overwrite Existing

Whether or not to overwrite existing values in the field. When not selected, only empty fields are updated. Otherwise, when selected, all Unit groups are updated regardless of existing values.

Auto UnitGroup languages

Button to perform the update. First check Confirm. Note that the Save button has no effect.

After running an update, the screen shows a report of the fields that were considered and which were updated (saved). In this example, Mexico and Cayman Islands were not updated. This is because those groups already had values, and Overwrite Existing was not selected.

Example of successful request message: Each group is listed with its mapping

Tip: To test the processes without committing the changes, use a false name in the Field value, such as testField. As long as the field does not exist, the changes are not be committed, but the report still shows the result of which Unit groups would be affected.