Developing International Software - page 9

Locales

Glossary


  • Locale: The collection of features of the user's environment that is dependent on language, country/region, and cultural conventions. The locale determines conventions such as sort order; keyboard layout; and date, time, number, and currency formats. In Windows, locales usually provide more information about cultural conventions than about languages.
  • Locale-aware: Exhibiting different behavior or returning different data, depending on the locale. For example, the Win32 sorting functions return different results depending on the locale parameter sent to each function.
  • National standard: A linguistic rule, measurement, educational guideline, or technology-related convention as defined by a government or by the International Organization for Standardization. Examples include character sets, keyboard layouts, and some cultural conventions, such as punctuation.
  • Syllabary: A set of written characters in which each character represents a syllable (for example, a consonant sound followed by a vowel sound). Examples of syllabaries include Japanese katakana and hiragana and the Indic scripts.
  • Script: A collection of characters for displaying written text, all of which have a common characteristic that justifies their consideration as a distinct set. One script can be used for several different languages (for example, Latin script, which covers all of Western Europe). Some written languages require multiple scripts (for example, Japanese, which requires at least three scripts-the hiragana and katakana syllabaries and the kanji ideographs imported from China). This sense of the word "script" has nothing to do with programming scripts such as Perl or Microsoft Visual Basic Scripting Edition.
  • Hiragana: The Japanese cursive script. Each hiragana character represents a phonetic syllable.
  • Katakana: A Japanese script of phonetic syllables, chiefly used to spell words borrowed from other languages. Each katakana character represents a phonetic syllable.
  • Separators: Symbols used to separate items in a list, mark the thousands place in numbers, or represent a decimal point. Different locales follow different conventions for separators.

Geographically speaking, a locale is a place. In software terms, a locale is a set of information associated with a place or a culture. Locale information on Windows includes the name and identifier of the spoken language, the script used to write the language, and cultural conventions. (See Table 1-1.) Locale-aware standards include keyboard layouts, default paper sizes and envelope sizes, character sets or character encoding ranges, text directionality (left-to-right or right-to-left, horizontal or vertical), and input methods. Chapter 4, "Locale and Cultural Awareness," discusses different aspects of locale information in detail.

Table 1-1 Selected default information for several locales.

Locale

English (United States)

French (France)

Japanese

United Arab Emirates (UAE) Arabic

Country/Region

United States

France

Japan

United Arab Emirates

Language

English

French

Japanese

Arabic

Written Script(s)

Latin

Latin

Kana, kanji

Arabic

Direction of Text

Left to right

Left to right

Left to right horizontally or right to left vertically

Right to left

Windows-Defined Code Page

1252

1252

932

1256

Currency Symbol

$

¥

Long-Date Format

January 27, 2004

27 January 2004

2004 127

,

Short-Date Format

1/27/04

27/01/2004

04/01/27

04/01/27

Time Format

1:00 pm

13:00

13:00

1:00

Calendar

Gregorian

Gregorian

Gregorian (Localized)

Gregorian (Localized)

Default Paper Size

U.S. Letter (8-1/2 x 11 in)

A4 (210 x 297 mm)

A4 (210 x 297 mm)

A4 (210 x 297 mm)

Decimal Separator

.

,

.

,

List Separator

,

;

,

;

Thousands Separator

,

Space

,

,

Windows supports a large set of locales, which it tags with language and sublanguage pairs. The sublanguage generally corresponds to a country/region. One way to think of this is in terms of the phrase "X language as spoken in Y country/region." The way people speak or write a particular language might not necessarily change dramatically from one country/region to the next, but cultural conventions and national standards often differ nonetheless. However, there are other locales where the language can significantly change between country/region, as in the case of Brazilian and Portuguese locales.

Microsoft Windows XP supports 135 locales. Among these are five Chinese-language locales (Hong Kong SAR, Macau SAR, the People's Republic of China, Singapore, and Taiwan), 13 English locales (Australia, Belize, Canada, Caribbean, Ireland, Jamaica, New Zealand, Philippines, South Africa, Trinidad, the United Kingdom, the United States, and Zimbabwe), and six French locales (Belgium, Canada, France, Luxembourg, Monaco, and Switzerland). In addition, Windows XP supports 16 Arabic locales plus nine Indic locales.