Selecting a Locale Sample

Description

A locale is used to represent a geographic region, language, or set of local customs. The current setting of locale affects such things as deciding which characters are letters, the sorting (collation) order of strings, and formatting of numeric values.

There are three ways of creating a locale:

	locale loc = locale();		// default

	locale loc = locale::classic();	// the same locale as used by C

	locale loc = locale("fr_ca");	// a specific named locale

Once a locale is created, it can be set as the global locale using:

	locale::global(loc);

Concept

The sample program creates several locales, and sets the global locale to be fr_ca.

Special Notes:

has_facet<> and use_facet<> can be used to query the various facets (properties) of a locale. imbue() is used to set a locale for an I/O stream.

Supported
Supported
Supported