Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
1.  Solaris Internationalization Overview What Is a Locale? Full and Partial Locales  Previous   Contents   Next 
   
 

Behavior Affected by Locales

Different cultures often use different conventions for writing the date and time, formatting numbers, delimiting words and phrases, and quoting material. Throughout the system, a locale determines the behavior of the following items:

  • Encoding and processing of text data.

  • Identifying the language and encoding of resource files.

  • Rendering and layout of text strings.

  • Interchanging text that is used for interclient text communication.

  • Selecting the input method (that is, which codeset is generated) and the processing of text data.

  • Font and icon files that are culturally specific.

  • Actions and file types.

  • User Interface Definition (UID) files.

  • Date and time formats.

  • Numeric formats.

  • Monetary formats.

  • Collation order.

  • Regular expression handling specific to the locale.

  • Format for informative and diagnostic messages and interactive responses.

The Solaris environment separates language and culture-dependent information from the application and saves it outside the application. Doing so eliminates the need to translate, rewrite, or recompile the application for each market. The only requirement to enter a new market is to localize the external information to the local language and customs.

Locale Categories

The locale categories are as follows:

LC_CTYPE

Controls the behavior of character handling functions.

LC_TIME

Specifies date and time formats, including month names, days of the week, and common full and abbreviated representations.

LC_MONETARY

Specifies monetary formats, including currency symbol for the locale, thousands separator, sign position, the number of fractional digits, and so forth.

LC_NUMERIC

Specifies the decimal delimiter (or radix character), the thousands separator, and the grouping.

LC_COLLATE

Specifies a collation order, and regular expression definition for the locale.

LC_MESSAGES

Specifies the language in which the localized messages are written, affirmative and negative responses of the locale (yes and no strings and expressions).

LO_LTYPE

Specifies the layout engine that provides information about language rendering. Language rendering (or text rendering) consists of text shaping and directionality.

Using Locale Categories for Localization

The localization of a product should be done in consultation with native users in that target language or region. Certain information styles and formats might seem perfectly obvious and universal to the developer but to the user, they could look awkward, wrong, or even offensive. The following sections describe the elements in the Solaris operating environment that you can control and specify so that you can successfully localize your product.

Time Formats

The following table shows some of the ways in which different locales write 11:59 P.M.

Table 1-1 International Time Formats

Locale

Format

Canadian

23:59

Finnish

23.59

German

23.59 Uhr

Norwegian

23.59

Thai

23:59

Great Britain

23:59

Time is represented by both a 12-hour clock and a 24-hour clock. The hour and minute separator can be either a colon ( : ) or a period ( . ).

Time zone splits occur between and within countries. Although a time zone can be described in terms of how many hours it is ahead of, or behind, Coordinated Universal Time, UTC (or Greenwich Mean Time, GMT), this number is not always an integer. For example, Newfoundland is in a time zone that is half an hour different from the adjacent time zone.

Daylight Savings Time (DST) starts and ends on different dates that can vary from country to country. Many countries do not implement DST at all. Additionally, Daylight Savings Time can vary within a time zone. In the U.S. it is a state decision.

Date Formats

The following table shows some of the date formats used around the world. Notice that even within a country, there can be variations.

Table 1-2 International Date Formats

Locale

Convention

Example

Canadian (English)

dd/mm/yy

24/08/01

Danish

yyyy-mm-dd

2001-08-24

Finnish

dd.mm.yyyy

24.08.2001

French

dd/mm/yyyy

24/08/2001

German

yyyy-mm-dd

2001-08-24

Italian

dd/mm/yy

24/08/01

Norwegian

dd-mm-yy

24-08-01

Spanish

dd-mm-yy

24-08-01

Swedish

yyyy-mm-dd

2001-08-24

Great Britain

dd/mm/yy

24/08/01

United States

mm-dd-yy

08-24-01

Thai

dd/mm/yyyy

24/08/2001

Numbers

Great Britain and the United States are two of the few places in the world that use a period to indicate the decimal place. Many other countries use a comma instead. The decimal separator is also called the radix character. Likewise, while Great Britain and the United States use a comma to separate groups of thousands, many other countries use a period instead, and some countries separate thousands groups with a thin space.

Data files containing locale-specific formats are frequently misinterpreted when transferred to a system in a different locale. For example, a file containing numbers in a French format is not useful to a British-specific program.

The following table shows some commonly used numeric formats.

Table 1-3 International Numeric Conventions

Locale

Large Number

Canadian (English)

4,294,967.00

Danish

4.294 967.295,00

Finnish

4 294 967 295,00

French

4 294 967 295,00

German

4,294,967.00

Italian

4.294.967,00

Norwegian

4.294.967.295,00

Spanish

4.294.967.295,00

Swedish

4 294 967 295,00

Great Britain

4,294,967,295.00

Uhited States

4,294,967,295.00

Thai

4,294,967,295.00


Note - There are no particular locale conventions that specify how to separate numbers in a list.


 
 
 
  Previous   Contents   Next