Locale Class Reference

A class that encapsulates locale-specific information. More...

#include <Locale.h++>

List of all members.

Public Member Functions

 Locale (String language, String country=String::null, String variant=String::null)
 Construct a new Locale for the given language, and, optionally, country code and variant.
 ~Locale ()
 Destructor.
bool isValid () const throw ()
 Determine if this object represents a valid locale.
String getEncoding () const
 Get the default character encoding for this locale.
String getAMAffix () const
 Get the ante meridiem suffix for this locale, if any.
String getPMAffix () const
 Get the post meridiem suffix for this locale, if any.
String getWeekDayName (int day) const
 Get the full weekday name for the given weekday in this locale.
String getAbbreviatedWeekDayName (int day) const
 Get the abbreviated weekday name for the given weekday in this locale.
String getMonthName (int month) const
 Get the full month name for the given month in this locale.
String getAbbreviatedMonthName (int month) const
 Get the abbreviated month name for the given month in this locale.
String getRadixCharacter () const
 Get the radix character for this locale.
String getThousandsSeparator () const
 Get the thousands separator for this locale.
String getCurrencySymbol () const
 Get the currency symbol for this locale.
String getLanguage () const
 Get the language component of this locale.
String getCountry () const
 Get the country component of this locale.
String getVariant () const
 Get the variant component of this locale.
String toString () const
 Get a String representation of this locale.

Static Public Member Functions

static String getCurrentEncoding ()
 Get the current character encoding.
static const Locale getCurrent ()
 Get the current locale.
static bool setCurrent (const Locale &locale)
 Set the current locale.

Static Public Attributes

static const Locale CANADA
 The "en_CA" locale.
static const Locale CANADA_FRENCH
 The "fr_CA" locale.
static const Locale CHINA
 The "zh_CN" locale.
static const Locale CHINESE
 The "zh" locale.
static const Locale ENGLISH
 The "en" locale.
static const Locale FRANCE
 The "fr_FR" locale.
static const Locale FRENCH
 The "fr" locale.
static const Locale GERMANY
 The "de_DE" locale.
static const Locale GERMAN
 The "de" locale.
static const Locale ITALY
 The "it_IT" locale.
static const Locale ITALIAN
 The "it" locale.
static const Locale JAPAN
 The "ja" locale.
static const Locale JAPANESE
 The "ja" locale.
static const Locale KOREA
 The "ko" locale.
static const Locale KOREAN
 The "ko" locale.
static const Locale SPANISH
 The "es" locale.
static const Locale SIMPLIFIED_CHINESE
 The "zh_CN" locale.
static const Locale TRADITIONAL_CHINESE
 The "zh_TW" locale.
static const Locale TAIWAN
 The "zh_TW" locale.
static const Locale UNITED_KINGDOM
 The "en_GB" locale.
static const Locale UNITED_STATES
 The "en_US" locale.

Detailed Description

A class that encapsulates locale-specific information.

Author:
Mark Lindner

Constructor & Destructor Documentation

Locale ( String  language,
String  country = String::null,
String  variant = String::null 
)

Construct a new Locale for the given language, and, optionally, country code and variant.

~Locale (  ) 

Destructor.


Member Function Documentation

String getAbbreviatedMonthName ( int  month  )  const

Get the abbreviated month name for the given month in this locale.

Parameters:
month The month number (1 - 12).
String getAbbreviatedWeekDayName ( int  day  )  const

Get the abbreviated weekday name for the given weekday in this locale.

Parameters:
day The weekday number (1 - 7; where 1 indicates Monday).
String getAMAffix (  )  const

Get the ante meridiem suffix for this locale, if any.

String getCountry (  )  const [inline]

Get the country component of this locale.

String getCurrencySymbol (  )  const

Get the currency symbol for this locale.

const Locale getCurrent (  )  [static]

Get the current locale.

String getCurrentEncoding (  )  [static]

Get the current character encoding.

String getEncoding (  )  const

Get the default character encoding for this locale.

String getLanguage (  )  const [inline]

Get the language component of this locale.

String getMonthName ( int  month  )  const

Get the full month name for the given month in this locale.

Parameters:
month The month number (1 - 12).
String getPMAffix (  )  const

Get the post meridiem suffix for this locale, if any.

String getRadixCharacter (  )  const

Get the radix character for this locale.

String getThousandsSeparator (  )  const

Get the thousands separator for this locale.

String getVariant (  )  const [inline]

Get the variant component of this locale.

String getWeekDayName ( int  day  )  const

Get the full weekday name for the given weekday in this locale.

Parameters:
day The weekday number (1 - 7; where 1 indicates Monday).
bool isValid (  )  const throw ()

Determine if this object represents a valid locale.

bool setCurrent ( const Locale locale  )  [static]

Set the current locale.

String toString (  )  const [inline]

Get a String representation of this locale.


Member Data Documentation

const Locale CANADA [static]

The "en_CA" locale.

const Locale CANADA_FRENCH [static]

The "fr_CA" locale.

const Locale CHINA [static]

The "zh_CN" locale.

const Locale CHINESE [static]

The "zh" locale.

const Locale ENGLISH [static]

The "en" locale.

const Locale FRANCE [static]

The "fr_FR" locale.

const Locale FRENCH [static]

The "fr" locale.

const Locale GERMAN [static]

The "de" locale.

const Locale GERMANY [static]

The "de_DE" locale.

const Locale ITALIAN [static]

The "it" locale.

const Locale ITALY [static]

The "it_IT" locale.

const Locale JAPAN [static]

The "ja" locale.

const Locale JAPANESE [static]

The "ja" locale.

const Locale KOREA [static]

The "ko" locale.

const Locale KOREAN [static]

The "ko" locale.

const Locale SIMPLIFIED_CHINESE [static]

The "zh_CN" locale.

const Locale SPANISH [static]

The "es" locale.

const Locale TAIWAN [static]

The "zh_TW" locale.

const Locale TRADITIONAL_CHINESE [static]

The "zh_TW" locale.

const Locale UNITED_KINGDOM [static]

The "en_GB" locale.

const Locale UNITED_STATES [static]

The "en_US" locale.


The documentation for this class was generated from the following files:
Generated on Sat Nov 26 16:49:09 2011 for libcommonc++ by  doxygen 1.6.3