Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::locale::localization_backend Class Referenceabstract

this class represents a localization backend that can be used for localizing your application. More...

#include <localization_backend.hpp>

Public Member Functions

 localization_backend ()
 
virtual ~localization_backend ()
 
virtual localization_backendclone () const =0
 Make a polymorphic copy of the backend. More...
 
virtual void set_option (std::string const &name, std::string const &value)=0
 Set option for backend, for example "locale" or "encoding". More...
 
virtual void clear_options ()=0
 Clear all options. More...
 
virtual std::locale install (std::locale const &base, locale_category_type category, character_facet_type type=nochar_facet)=0
 Create a facet for category category and character type type. More...
 

Detailed Description

this class represents a localization backend that can be used for localizing your application.

Backends are usually registered inside the localization backends manager and allow transparent support of different backends, so a user can switch the backend by simply linking the application to the correct one.

Backends may support different tuning options, but these are the default options available to the user for all of them

  1. locale - the name of the locale in POSIX format like en_US.UTF-8
  2. use_ansi_encoding - select system locale using ANSI codepages rather then UTF-8 under Windows by default
  3. message_path - path to the location of message catalogs (vector of strings)
  4. message_application - the name of applications that use message catalogs (vector of strings)

Each backend can be installed with a different default priotiry so when you work with two different backends, you can specify priotiry so this backend will be chosen according to their priority.

Constructor & Destructor Documentation

boost::locale::localization_backend::localization_backend ( )
inline
virtual boost::locale::localization_backend::~localization_backend ( )
inlinevirtual

Member Function Documentation

virtual void boost::locale::localization_backend::clear_options ( )
pure virtual

Clear all options.

virtual localization_backend* boost::locale::localization_backend::clone ( ) const
pure virtual

Make a polymorphic copy of the backend.

virtual std::locale boost::locale::localization_backend::install ( std::locale const &  base,
locale_category_type  category,
character_facet_type  type = nochar_facet 
)
pure virtual

Create a facet for category category and character type type.

virtual void boost::locale::localization_backend::set_option ( std::string const &  name,
std::string const &  value 
)
pure virtual

Set option for backend, for example "locale" or "encoding".


The documentation for this class was generated from the following file: