Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Internationalization Module User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

10.2 Named Locales

In the Internationalization Module, a locale name consists of one or more of the following components, in the following order:

Multiple components are joined by underbars. For example, locale zh_TW contains the ISO-639 language code for Chinese and the ISO-3166 country code for Taiwan. Locale es_ES_TRADITIONAL uses a variant code to specify traditional Spanish.

10.2.1 Listing Language Codes

Class RWUIsoLanguageList constructs iterators that provide access to the static list of ISO-639 language codes recognized by the Internationalization Module. For example, you might use this class to display a list of language codes to an end user. The list cannot be changed at run time.

The static begin() and end() methods return standard iterators. This code constructs an iterator object, then iterates over the list of language codes and writes them to std::cout:

RWUIsoLanguageList may also be instantiated to produce an object that allows easy access to the static methods:


The Internationalization Module does not recognize deprecated language codes.

10.2.2 Listing Country Codes

Class RWUIsoCountryList constructs iterators that provide access to the static list of ISO-3166 country codes recognized by the Internationalization Module. For example, you might use this class to display a list of country codes to an end user. The list cannot be changed at run time.

The static begin() and end() methods return standard iterators. This code constructs an iterator object, then iterates over the list of country codes and writes them to std::cout:

RWUIsoCountryList may also be instantiated to produce an object that allows easy access to the static methods:


The Internationalization Module does not recognize deprecated country codes.

10.2.3 Listing Available Locales

Class RWUAvailableLocaleList constructs RWUAvailableLocaleListIterator instances that provide access to the recognized list of locale names. The list cannot be changed at runtime.

The static begin() and end() methods return standard RWUAvailableLocaleListIterators. For example, this code constructs an iterator object, then iterates over the list of locales and writes them to std::cout:

RWUAvailableLocaleList may also be instantiated to produce an object that allows easy access to the static methods:



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.