Boost.Locale
|
this class represents a localization backend that can be used for localizing your application. More...
#include <boost/locale/localization_backend.hpp>
Public Member Functions | |
virtual localization_backend * | clone () const =0 |
Make a polymorphic copy of the backend. | |
virtual void | set_option (const std::string &name, const std::string &value)=0 |
Set option for backend, for example "locale" or "encoding". | |
virtual void | clear_options ()=0 |
Clear all options. | |
virtual std::locale | install (const std::locale &base, category_t category, char_facet_t type)=0 |
Create a facet for category category and character type type. | |
Protected Member Functions | |
localization_backend (const localization_backend &)=default | |
localization_backend & | operator= (const localization_backend &)=default |
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
locale
- the name of the locale in POSIX format like en_US.UTF-8use_ansi_encoding
- select system locale using ANSI codepages rather then UTF-8 under Windows by defaultmessage_path
- path to the location of message catalogs (vector of strings)message_application
- the name of applications that use message catalogs (vector of strings)Each backend can be installed with a different default priority so when you work with two different backends, you can specify priority so this backend will be chosen according to their priority.