Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::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.
 
 boundary
 This namespae contains all operations required for boundary analysis of text.
 
 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
 This class defines generic calendar class, it is used by date_time and calendar objects internally. More...
 
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...
 
singleton  converter
 
class  converter< char >
 
class  converter< wchar_t >
 
class  converter_base
 This class provides base flags for text manipulation. 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. 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  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
 Structure that define POSIX time, seconds and milliseconds since Jan 1, 1970, 00:00 not including leap seconds. More...
 

Typedefs

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

Enumerations

enum  norm_type {
  norm_nfd,
  norm_nfc,
  norm_nfkd,
  norm_nfkc,
  norm_default = norm_nfc
}
 The type that defined normalization form More...
 

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())
 Normalize Unicode string str according to normalization form n. More...
 
template<typename CharType >
std::basic_string< CharType > normalize (CharType const *str, norm_type n=norm_default, std::locale const &loc=std::locale())
 Normalize NUL terminated Unicode string str according to normalization form n. More...
 
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())
 Normalize Unicode string in range [begin,end) according to normalization form n. More...
 
template<typename CharType >
std::basic_string< CharType > to_upper (std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
 Convert a string str to upper case according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > to_upper (CharType const *str, std::locale const &loc=std::locale())
 Convert a NUL terminated string str to upper case according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > to_upper (CharType const *begin, CharType const *end, std::locale const &loc=std::locale())
 Convert a string in range [begin,end) to upper case according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > to_lower (std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
 Convert a string str to lower case according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > to_lower (CharType const *str, std::locale const &loc=std::locale())
 Convert a NUL terminated string str to lower case according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > to_lower (CharType const *begin, CharType const *end, std::locale const &loc=std::locale())
 Convert a string in range [begin,end) to lower case according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > to_title (std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
 Convert a string str to title case according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > to_title (CharType const *str, std::locale const &loc=std::locale())
 Convert a NUL terminated string str to title case according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > to_title (CharType const *begin, CharType const *end, std::locale const &loc=std::locale())
 Convert a string in range [begin,end) to title case according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > fold_case (std::basic_string< CharType > const &str, std::locale const &loc=std::locale())
 Fold case of a string str according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > fold_case (CharType const *str, std::locale const &loc=std::locale())
 Fold case of a NUL terminated string str according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > fold_case (CharType const *begin, CharType const *end, std::locale const &loc=std::locale())
 Fold case of a string in range [begin,end) according to locale loc. More...
 
date_time_period_set operator+ (date_time_period_set const &a, date_time_period_set const &b)
 Append two periods sets. More...
 
date_time_period_set operator- (date_time_period_set const &a, date_time_period_set const &b)
 Append two period sets when all periods of set change their sign. More...
 
template<typename CharType >
std::basic_ostream< CharType > & operator<< (std::basic_ostream< CharType > &out, date_time const &t)
 Writes date_time t to output stream out. More...
 
template<typename CharType >
std::basic_istream< CharType > & operator>> (std::basic_istream< CharType > &in, date_time &t)
 Reads date_time t from output stream in. More...
 
date_time_duration operator- (date_time const &later, date_time const &earlier)
 Calculates the difference between two dates, the left operand is a later point on time line. More...
 
template<typename CharType >
std::basic_ostream< CharType > & operator<< (std::basic_ostream< CharType > &out, basic_format< CharType > const &fmt)
 Write formatted message to stream. More...
 
template<typename CharType >
std::basic_ostream< CharType > & operator<< (std::basic_ostream< CharType > &out, basic_message< CharType > const &msg)
 Translate message msg and write it to stream. More...
 
Indirect message translation function family

template<typename CharType >
basic_message< CharType > translate (CharType const *msg)
 Translate a message, msg is not copied. More...
 
template<typename CharType >
basic_message< CharType > translate (CharType const *context, CharType const *msg)
 Translate a message in context, msg and context are not copied. More...
 
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. More...
 
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. More...
 
template<typename CharType >
basic_message< CharType > translate (std::basic_string< CharType > const &msg)
 Translate a message, msg is copied. More...
 
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. More...
 
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. More...
 
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. More...
 
Direct message translation functions family

template<typename CharType >
std::basic_string< CharType > gettext (CharType const *id, std::locale const &loc=std::locale())
 Translate message id according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > ngettext (CharType const *s, CharType const *p, int n, std::locale const &loc=std::locale())
 Translate plural form according to locale loc. More...
 
template<typename CharType >
std::basic_string< CharType > dgettext (char const *domain, CharType const *id, std::locale const &loc=std::locale())
 Translate message id according to locale loc in domain domain. More...
 
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())
 Translate plural form according to locale loc in domain domain. More...
 
template<typename CharType >
std::basic_string< CharType > pgettext (CharType const *context, CharType const *id, std::locale const &loc=std::locale())
 Translate message id according to locale loc in context context. More...
 
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())
 Translate plural form according to locale loc in context context. More...
 
template<typename CharType >
std::basic_string< CharType > dpgettext (char const *domain, CharType const *context, CharType const *id, std::locale const &loc=std::locale())
 Translate message id according to locale loc in domain domain in context context. More...
 
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())
 Translate plural form according to locale loc in domain domain in context context. More...
 

Detailed Description

This is the main namespace that encloses all localization classes.

Typedef Documentation

type that specifies the character type that locales can be generated for

a type used for more fine grained generation of facets