libcommonc++
0.7
|
A class that encapsulates locale-specific information. More...
#include <Locale.h++>
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. More... | |
~Locale () | |
Destructor. More... | |
bool | isValid () const |
Determine if this object represents a valid locale. More... | |
String | getEncoding () const |
Get the default character encoding for this locale. More... | |
String | getAMAffix () const |
Get the ante meridiem suffix for this locale, if any. More... | |
String | getPMAffix () const |
Get the post meridiem suffix for this locale, if any. More... | |
String | getWeekDayName (int day) const |
Get the full weekday name for the given weekday in this locale. More... | |
String | getAbbreviatedWeekDayName (int day) const |
Get the abbreviated weekday name for the given weekday in this locale. More... | |
String | getMonthName (int month) const |
Get the full month name for the given month in this locale. More... | |
String | getAbbreviatedMonthName (int month) const |
Get the abbreviated month name for the given month in this locale. More... | |
String | getRadixCharacter () const |
Get the radix character for this locale. More... | |
String | getThousandsSeparator () const |
Get the thousands separator for this locale. More... | |
String | getCurrencySymbol () const |
Get the currency symbol for this locale. More... | |
String | getLanguage () const |
Get the language component of this locale. More... | |
String | getCountry () const |
Get the country component of this locale. More... | |
String | getVariant () const |
Get the variant component of this locale. More... | |
String | toString () const |
Get a String representation of this locale. More... | |
Static Public Member Functions | |
static String | getCurrentEncoding () |
Get the current character encoding. More... | |
static const Locale | getCurrent () |
Get the current locale. More... | |
static bool | setCurrent (const Locale &locale) |
Set the current locale. More... | |
Static Public Attributes | |
static const Locale | CANADA |
The "en_CA" locale. More... | |
static const Locale | CANADA_FRENCH |
The "fr_CA" locale. More... | |
static const Locale | CHINA |
The "zh_CN" locale. More... | |
static const Locale | CHINESE |
The "zh" locale. More... | |
static const Locale | ENGLISH |
The "en" locale. More... | |
static const Locale | FRANCE |
The "fr_FR" locale. More... | |
static const Locale | FRENCH |
The "fr" locale. More... | |
static const Locale | GERMANY |
The "de_DE" locale. More... | |
static const Locale | GERMAN |
The "de" locale. More... | |
static const Locale | ITALY |
The "it_IT" locale. More... | |
static const Locale | ITALIAN |
The "it" locale. More... | |
static const Locale | JAPAN |
The "ja" locale. More... | |
static const Locale | JAPANESE |
The "ja" locale. More... | |
static const Locale | KOREA |
The "ko" locale. More... | |
static const Locale | KOREAN |
The "ko" locale. More... | |
static const Locale | SPANISH |
The "es" locale. More... | |
static const Locale | SIMPLIFIED_CHINESE |
The "zh_CN" locale. More... | |
static const Locale | TRADITIONAL_CHINESE |
The "zh_TW" locale. More... | |
static const Locale | TAIWAN |
The "zh_TW" locale. More... | |
static const Locale | UNITED_KINGDOM |
The "en_GB" locale. More... | |
static const Locale | UNITED_STATES |
The "en_US" locale. More... | |
A class that encapsulates locale-specific information.
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.
String getAbbreviatedMonthName | ( | int | month | ) | const |
Get the abbreviated month name for the given month in this locale.
month | The month number (1 - 12). |
String getAbbreviatedWeekDayName | ( | int | day | ) | const |
Get the abbreviated weekday name for the given weekday in this locale.
day | The weekday number (1 - 7; where 1 indicates Monday). |
String getAMAffix | ( | ) | const |
Get the ante meridiem suffix for this locale, if any.
|
inline |
Get the country component of this locale.
String getCurrencySymbol | ( | ) | const |
Get the currency symbol for this locale.
|
static |
Get the current locale.
|
static |
Get the current character encoding.
String getEncoding | ( | ) | const |
Get the default character encoding for this locale.
|
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.
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.
|
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.
day | The weekday number (1 - 7; where 1 indicates Monday). |
bool isValid | ( | ) | const |
Determine if this object represents a valid locale.
|
static |
Set the current locale.
|
static |
The "en_CA" locale.
|
static |
The "fr_CA" locale.
|
static |
The "zh_CN" locale.
|
static |
The "zh" locale.
|
static |
The "en" locale.
|
static |
The "fr_FR" locale.
|
static |
The "fr" locale.
|
static |
The "de" locale.
|
static |
The "de_DE" locale.
|
static |
The "it" locale.
|
static |
The "it_IT" locale.
|
static |
The "ja" locale.
|
static |
The "ja" locale.
|
static |
The "ko" locale.
|
static |
The "ko" locale.
|
static |
The "zh_CN" locale.
|
static |
The "es" locale.
|
static |
The "zh_TW" locale.
|
static |
The "zh_TW" locale.
|
static |
The "en_GB" locale.
|
static |
The "en_US" locale.