Locale and Locale Sensitivity

Various data types (date and time, any numeric values, strings) can be displayed, parsed, or formatted in different ways according to the Locale property. See Locale for more information.

Strings can also be influenced by Locale sensitivity. See Locale Sensitivity.

Locale

Locale represents a specific geographical, political, or cultural region. An operation that requires a locale to perform its task is called locale-sensitive and uses the locale to tailor information for the user. For example, displaying a number is a locale-sensitive operation as the number should be formatted according to the customs/conventions of the native country, region, or culture of the user.

Each locale code consists of the language code and country arguments.

The language argument is a valid ISO Language Code. These codes are the lower-case, two-letter codes as defined by ISO-639.

The country argument is a valid ISO Country Code. These codes are the upper-case, two-letter codes as defined by ISO-3166.

Instead of specifying the format parameter (or together with it), you can specify the locale parameter.

  • In strings, instead of setting a format for the whole date field, specify e.g. the German locale. Clover will then automatically choose the proper date format used in Germany. If the locale is not specified at all, Clover will choose the default one which is given by your system. In order to learn how to change the default locale, refer to Chapter 18, Engine Configuration

  • In numbers, on the other hand, there are cases when both the format and locale parameters are meaningful. In case of specifying the format of decimal numbers, you define the format/pattern with a decimal separator and the locale determines whether the separator is a comma or a dot. If neither the locale or format is specified, the number is converted to string using a universal technique (without checking defaultProperties). If only the format parameter is given, the default locale is used.

See also http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html for details about locale in Java.

Example 32.2. Examples of Locale

en.US or en.GB


To get more examples of other formatting that is affected when the locale is changed see Locale-Sensitive Formatting.

Dates, too, can have different formats in different locales (even with different countries of the same language). For instance, March 2, 2009 (in the USA) vs. 2 March 2009 (in the UK).

List of all Locale

A complete list of the locale supported by CloverETL can be found in a separate table below. The locale format as described above is always "language.COUNTRY".

Table 32.14. List of all Locale

Locale codeMeaning
[system default] Locale determined by your OS
arArabic language
ar.AE Arabic - United Arab Emirates
ar.BH Arabic - Bahrain
ar.DZ Arabic - Algeria
ar.EG Arabic - Egypt
ar.IQ Arabic - Iraq
ar.JO Arabic - Jordan
ar.KW Arabic - Kuwait
ar.LB Arabic - Lebanon
ar.LY Arabic - Libya
ar.MA Arabic - Morocco
ar.OM Arabic - Oman
ar.QA Arabic - Qatar
ar.SA Arabic - Saudi Arabia
ar.SD Arabic - Sudan
ar.SY Arabic - Syrian Arab Republic
ar.TN Arabic - Tunisia
ar.YE Arabic - Yemen
be Belorussian language
be.BY Belorussian - Belarus
bg Bulgarian language
bg.BG Bulgarian - Bulgaria
ca Catalan language
ca.ES Catalan - Spain
cs Czech language
cs.CZ Czech - Czech Republic
da Danish language
da.DK Danish - Denmark
de German language
de.AT German - Austria
de.CH German - Switzerland
de.DE German - Germany
de.LU German - Luxembourg
el Greek language
el.CY Greek - Cyprus
el.GR Greek - Greece
en English language
en.AU English - Australia
en.CA English - Canada
en.GB English - Great Britain
en.IE English - Ireland
en.IN English - India
en.MT English - Malta
en.NZ English - New Zealand
en.PH English - Philippines
en.SG English - Singapore
en.US English - United States
en.ZA English - South Africa
es Spanish language
es.AR Spanish - Argentina
es.BO Spanish - Bolivia
es.CL Spanish - Chile
es.CO Spanish - Colombia
es.CR Spanish - Costa Rica
es.DO Spanish - Dominican Republic
es.EC Spanish - Ecuador
es.ES Spanish - Spain
es.GT Spanish - Guatemala
es.HN Spanish - Honduras
es.MX Spanish - Mexico
es.NI Spanish - Nicaragua
es.PA Spanish - Panama
es.PR Spanish - Puerto Rico
es.PY Spanish - Paraguay
es.US Spanish - United States
es.UY Spanish - Uruguay
es.VE Spanish - Venezuela
et Estonian language
et.EE Estonian - Estonia
fi Finnish language
fi.FI Finnish - Finland
fr French language
fr.BE French - Belgium
fr.CA French - Canada
fr.CH French - Switzerland
fr.FR French - France
fr.LU French - Luxembourg
ga Irish language
ga.IE Irish - Ireland
he Hebrew language
he.IL Hebrew - Israel
hi.IN Hindi - India
hr Croatian language
hr.HR Croatian - Croatia
id Indonesian language
id.ID Indonesian - Indonesia
is Icelandic language
is.IS Icelandic - Iceland
it Italian language
it.CH Italian - Switzerland
it.IT Italian - Italy
iw Hebrew language
iw.IL Hebrew - Israel
ja Japanese language
ja.JP Japanese - Japan
ko Korean language
ko.KR Korean - Republic of Korea
lt Lithuanian language
lt.LT Lithuanian language - Lithuania
lv Latvian language
lv.LV Latvian language - Latvia
mk Macedonian language
mk.MK Macedonian - The Former Yugoslav Republic of Macedonia
ms Malay language
ms.MY Malay - Burmese
mt Maltese language
mt.MT Maltese - Malta
nl Dutch language
nl.BE Dutch - Belgium
nl.NL Dutch - Netherlands
no Norwegian language
no.NO Norwegian - Norway
pl Polish language
pl.PL Polish - Poland
pt Portuguese language
pt.BR Portuguese - Brazil
pt.PT Portuguese - Portugal
ro Romanian language
ro.RO Romanian - Romany
ru Russian language
ru.RU Russian - Russian Federation
sk Slovak language
sk.SK Slovak - Slovakia
sl Slovenian language
sl.SI Slovenian - Slovenia
sq Albanian language
sq.AL Albanian - Albania
sr Serbian language
sr.BA Serbian - Bosnia and Herzegowina
sr.CS Serbian - Serbia and Montenegro
sr.ME Serbian - Serbia (Cyrillic, Montenegro)
sr.RS Serbian - Serbia (Latin, Serbia)
sv Swedish language
sv.SE Swedish - Sweden
th Thai language
th.TH Thai - Thailand
tr Turkish language
tr.TR Turkish - Turkey
uk Ukrainian language
uk.UA Ukrainian - Ukraine
vi.VN Vietnamese - Vietnam
zh Chinese language
zh.CN Chinese - China
zh.HK Chinese - Hong Kong
zh.SG Chinese - Singapore
zh.TW Chinese - Taiwan

Locale Sensitivity

Locale sensitivity can be applied to the string data type only. What is more, the Locale has to be specified either for the field or the whole record.

Field settings override the Locale sensitivity specified for the whole record.

Values of Locale sensitivity are the following:

  • base_letter_sensitivity

    Does not distinguish different cases of letters nor letters with diacritical marks.

  • accent_sensitivity

    Does not distinguish different cases of letters. It distinguishes letters with diacritical marks.

  • case_sensitivity

    Distinguishes different cases of letters and letters with diacritical marks. It does not distinguish the letter encoding ("\u00C0" equals to "A\u0300")

  • identical_sensitivity

    Distinguishes the letter encoding ("\u00C0" equals to "A\u0300")