When you configure either the Import a CSV File for This View or Export This View to a CSV File action, you must specify the locale of the CSV row data in one of two ways.

  • You can select one of these supported locales from the CSV file locale dropdown. The locale defaults to English (United States). The locale you choose applies to all users of the action.

  • You can supply a locale expression that yields the locale identifier for one of these supported locales such as "en-US" for English (United States), "en-GB" for English (United Kingdom), or "de-DE" for German (Germany). This allows you to customize the locale for each user. For example, you might store the locale identifier in a field of UserSettings or retrieve it from a normal table using a LOOKUP expression. See topic "Storing the Locale in UserSettings" below for more details.

Locale and Data Format

The locale must match the format of the data in the CSV file. This is important for data values who's format varies by locale. For example, when Locale is English (United States), date values must be entered in M/d/yyyy format; when Locale is English (United Kingdom), date values must be entered in dd/MM/YYYY format; when Locale is German (Germany), date values must be entered in dd.MM.yyyy format.

The date and time format patterns are listed here.

The following data types are locale dependent:

  1. Date

  2. DateTime

  3. Decimal

  4. Percent

  5. Price

  6. Time

Locale and CSV Delimiter

The locale also dictates the delimiter used between data values in the CSV file. The delimiter normally complements the decimal number separator.

  • When the decimal number separator is period, the delimiter is comma.

  • When the decimal number separator is comma, the delimiter is semicolon.

When the locale is English (United States):

  1. Dates are in M/d/yyyy format.

  2. Times are in h:mm:ss tt format.

  3. Decimal, Price, and Percent values use period as the decimal separator.

  4. CSV data values are delimited by commas.

When the locale is English (United Kingdom):

  1. Dates are in dd/MM/YYYY format.

  2. Times are in HH:mm:ss format.

  3. Decimal, Price, and Percent values use period as the decimal separator.

  4. CSV data values are delimited by commas.

When the locale is German (Germany):

  1. Dates are in dd.MM.yyyy format.

  2. Times are in HH:mm:ss format.

  3. Decimal, Price, and Percent values use comma as the decimal separator.

  4. CSV data values are delimited by semicolons.

Storing the Locale in UserSettings

You can store the locale in UserSettings as follows:

  1. In the Editor, go to the Data > User Settings tab.

  2. Chose an available User Settings field and give it an appropriate name such as "CsvLocale".

  3. Set the field's TYPE to 'Text".

  4. Set the field's INITIAL VALUE to a supported locale id such as "de-DE".

  5. Click the Save button.

  6. In the Behavior > Actions tab open the Import or Export action.

  7. Click the expression (beaker) icon following the CSV file locale property and enter the following locale expression:
    USERSETTINGS(CsvLocale)

  8. Click the Save button.

Did this answer your question?