CppCMS
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
booster::locale Namespace Reference

This is the main namespace that encloses all localization classes. More...

Namespaces

 as
 This namespace includes all manipulators that can be used on IO streams.
 
 conv
 Namespace that contains all functions related to character set conversion.
 
 flags
 This namespace holds additional formatting flags that can be set using ios_info.
 
 gnu_gettext
 This namespace holds classes that provide GNU Gettext message catalogs support.
 
 period
 Namespace that contains various types for manipulation with dates.
 
 time_zone
 namespace that holds functions for operating with global time zone
 
 utf
 Namespace that holds basic operations on UTF encoded sequences.
 
 util
 This namespace provides various utility function useful for Boost.Locale backends implementations.
 

Classes

class  abstract_calendar
 
class  basic_format
 a printf like class that allows type-safe and locale aware message formatting More...
 
class  basic_message
 This class represents a message that can be converted to a specific locale message. More...
 
class  calendar
 this class provides an access to general calendar information. More...
 
class  calendar_facet
 the facet that generates calendar for specific locale More...
 
class  collator
 Collation facet. More...
 
class  collator_base
 a base class that includes collation level flags More...
 
struct  comparator
 This class can be used in STL algorithms and containers for comparison of strings with a level other than primary. More...
 
class  converter
 
class  converter< char >
 
class  converter< wchar_t >
 
class  converter_base
 This class provides base flags for text manipulation. It is used as base for converter facet. More...
 
class  date_time
 this class represents a date time and allows to perform various operation according to the locale settings. More...
 
class  date_time_duration
 This class represents a period: a pair of two date_time objects. More...
 
class  date_time_error
 This error is thrown in case of invalid state that occurred. More...
 
struct  date_time_period
 This class represents a pair of period_type and the integer values that describes its amount. For example 3 days or 4 years. More...
 
class  date_time_period_set
 this class that represents a set of periods, More...
 
class  generator
 the major class used for locale generation More...
 
class  generic_codecvt
 Geneneric generic codecvt facet, various stateless encodings to UTF-16 and UTF-32 using wchar_t, char32_t and char16_t. More...
 
class  generic_codecvt< CharType, CodecvtImpl, 1 >
 
class  generic_codecvt< CharType, CodecvtImpl, 2 >
 UTF-16 to/from UTF-8 codecvt facet to use with char16_t or wchar_t on Windows. More...
 
class  generic_codecvt< CharType, CodecvtImpl, 4 >
 UTF-32 to/from UTF-8 codecvt facet to use with char32_t or wchar_t on POSIX platforms. More...
 
class  generic_codecvt_base
 A base class that used to define constants for generic_codecvt. More...
 
class  hold_ptr
 a smart pointer similar to std::auto_ptr but it is non-copyable and the underlying object has the same constness as the pointer itself (unlike an ordinary pointer). More...
 
class  info
 a facet that holds general information about locale More...
 
class  ios_info
 This class holds an external data - beyond existing fmtflags that std::ios_base holds. More...
 
class  localization_backend
 this class represents a localization backend that can be used for localizing your application. More...
 
class  localization_backend_manager
 Localization backend manager is a class that holds various backend and allows creation of their combination or selection. More...
 
class  message_format
 This facet provides message formatting abilities. More...
 
struct  posix_time
 
class  utf8_codecvt
 Geneneric utf8 codecvt facet, it allows to convert UTF-8 strings to UTF-16 and UTF-32 using wchar_t, char32_t and char16_t. More...
 

Typedefs

typedef basic_format< char > format
 
typedef basic_format< wchar_t > wformat
 
typedef uint32_t character_facet_type
 type that specifies the character type that locales can be generated for
 
typedef uint32_t locale_category_type
 a type used for more fine grained generation of facets
 
typedef basic_message< char > message
 
typedef basic_message< wchar_t > wmessage
 

Enumerations

enum  norm_type {
  norm_nfd, norm_nfc, norm_nfkd, norm_nfkc,
  norm_default = norm_nfc
}
 

Functions

template<typename CharType >
std::basic_string< CharType > normalize (std::basic_string< CharType > const &str, norm_type n=norm_default, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > normalize (CharType const *str, norm_type n=norm_default, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > normalize (CharType const *begin, CharType const *end, norm_type n=norm_default, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > to_upper (std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > to_upper (CharType const *str, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > to_upper (CharType const *begin, CharType const *end, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > to_lower (std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > to_lower (CharType const *str, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > to_lower (CharType const *begin, CharType const *end, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > to_title (std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > to_title (CharType const *str, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > to_title (CharType const *begin, CharType const *end, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > fold_case (std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > fold_case (CharType const *str, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > fold_case (CharType const *begin, CharType const *end, std::locale const &loc=std::locale())
 
date_time_period_set operator+ (date_time_period_set const &a, date_time_period_set const &b)
 
date_time_period_set operator- (date_time_period_set const &a, date_time_period_set const &b)
 
template<typename CharType >
std::basic_ostream< CharType > & operator<< (std::basic_ostream< CharType > &out, date_time const &t)
 
template<typename CharType >
std::basic_istream< CharType > & operator>> (std::basic_istream< CharType > &in, date_time &t)
 
date_time_duration operator- (date_time const &later, date_time const &earlier)
 
template<typename CharType >
std::basic_ostream< CharType > & operator<< (std::basic_ostream< CharType > &out, basic_format< CharType > const &fmt)
 
template<typename CharType >
std::basic_ostream< CharType > & operator<< (std::basic_ostream< CharType > &out, basic_message< CharType > const &msg)
 
Indirect message translation function family

template<typename CharType >
basic_message< CharType > translate (CharType const *msg)
 Translate a message, msg is not copied.
 
template<typename CharType >
basic_message< CharType > translate (CharType const *context, CharType const *msg)
 Translate a message in context, msg and context are not copied.
 
template<typename CharType >
basic_message< CharType > translate (CharType const *single, CharType const *plural, int n)
 Translate a plural message form, single and plural are not copied.
 
template<typename CharType >
basic_message< CharType > translate (CharType const *context, CharType const *single, CharType const *plural, int n)
 Translate a plural message from in constext, context, single and plural are not copied.
 
template<typename CharType >
basic_message< CharType > translate (std::basic_string< CharType > const &msg)
 Translate a message, msg is copied.
 
template<typename CharType >
basic_message< CharType > translate (std::basic_string< CharType > const &context, std::basic_string< CharType > const &msg)
 Translate a message in context,context and msg is copied.
 
template<typename CharType >
basic_message< CharType > translate (std::basic_string< CharType > const &context, std::basic_string< CharType > const &single, std::basic_string< CharType > const &plural, int n)
 Translate a plural message form in constext, context, single and plural are copied.
 
template<typename CharType >
basic_message< CharType > translate (std::basic_string< CharType > const &single, std::basic_string< CharType > const &plural, int n)
 Translate a plural message form, single and plural are copied.
 
Direct message translation functions family

template<typename CharType >
std::basic_string< CharType > gettext (CharType const *id, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > ngettext (CharType const *s, CharType const *p, int n, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > dgettext (char const *domain, CharType const *id, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > dngettext (char const *domain, CharType const *s, CharType const *p, int n, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > pgettext (CharType const *context, CharType const *id, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > npgettext (CharType const *context, CharType const *s, CharType const *p, int n, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > dpgettext (char const *domain, CharType const *context, CharType const *id, std::locale const &loc=std::locale())
 
template<typename CharType >
std::basic_string< CharType > dnpgettext (char const *domain, CharType const *context, CharType const *s, CharType const *p, int n, std::locale const &loc=std::locale())
 

Variables

static const uint32_t nochar_facet = 0
 Unspecified character category for character independent facets.
 
static const uint32_t char_facet = 1 << 0
 8-bit character facets
 
static const uint32_t wchar_t_facet = 1 << 1
 wide character facets
 
static const uint32_t char16_t_facet = 1 << 2
 C++0x char16_t facets.
 
static const uint32_t char32_t_facet = 1 << 3
 C++0x char32_t facets.
 
static const uint32_t character_first_facet = char_facet
 First facet specific for character type.
 
static const uint32_t character_last_facet = char32_t_facet
 Last facet specific for character type.
 
static const uint32_t all_characters = 0xFFFF
 Special mask – generate all.
 
static const uint32_t convert_facet = 1 << 0
 Generate conversion facets.
 
static const uint32_t collation_facet = 1 << 1
 Generate collation facets.
 
static const uint32_t formatting_facet = 1 << 2
 Generate numbers, currency, date-time formatting facets.
 
static const uint32_t parsing_facet = 1 << 3
 Generate numbers, currency, date-time formatting facets.
 
static const uint32_t message_facet = 1 << 4
 Generate message facets.
 
static const uint32_t codepage_facet = 1 << 5
 Generate character set conversion facets (derived from std::codecvt)
 
static const uint32_t boundary_facet = 1 << 6
 Generate boundary analysis facet.
 
static const uint32_t per_character_facet_first = convert_facet
 First facet specific for character.
 
static const uint32_t per_character_facet_last = boundary_facet
 Last facet specific for character.
 
static const uint32_t calendar_facet = 1 << 16
 Generate boundary analysis facet.
 
static const uint32_t information_facet = 1 << 17
 Generate general locale information facet.
 
static const uint32_t non_character_facet_first = calendar_facet
 First character independent facet.
 
static const uint32_t non_character_facet_last = information_facet
 Last character independent facet.
 
static const uint32_t all_categories = 0xFFFFFFFFu
 Generate all of them.
 

Detailed Description

This is the main namespace that encloses all localization classes.