Locales

From a geographical perspective, a locale is a place. From a software perspective, a locale is a set of information associated with a place. The locale information includes the name and identifier of the spoken language, sorting and collating requirements, currency usage, numeric display preferences, and text directionality (left-to-right or right-to-left, horizontal or vertical). This section provides the locale definition codes involved in the internationalisation process.

The locale information includes the language, country and variant codes. Depending on the locale, you can specify only the language code or country and/or variant code along with the language code.

Each locale specifies a resource bundle of localized text. For example, in fr_FR_EURO, fr is the French language code, FR is the country code and EURO indicates the use of Euro currency.

Locale Definition

A Locale represents a specific geographical, political, or cultural region. An operation is locale-sensitive if it requires a locale to perform its task. For example, displaying a date is a locale-sensitive operation format the date according to the customs/conventions of the user's native country, region, or culture.

The following table lists the arguments and their corresponding descriptions required by the constructors.

Argument

Argument Name

Description

First

ISO Language Code

Indicates the lower-case two-letter codes defined by ISO-639.

http://www.ics.uci.edu/pub/ietf/http...ted/iso639.txt

Second

ISO Country Code

Indicates the upper-case two-letter codes as defined by ISO-3166.

http://www.chemie.fu-berlin.de/diver.../ISO_3166.html

Third

Variant

Indicates the variant codes to define the locale further. For example, European countries use the variant code EURO.

Copyright © 2020- Temenos Headquarters SA

Published on :
Wednesday, October 12, 2022 6:57:33 PM IST

Feedback
x