CppCMS
|
This structure holds all information required for creating gnu-gettext message catalogs,. More...
#include <booster/booster/locale/gnu_gettext.h>
Classes | |
struct | domain |
This type represents GNU Gettext domain name for the messages. More... | |
Public Types | |
typedef std::vector< domain > | domains_type |
typedef function< std::vector < char > std::string const &file_name, std::string const &encoding) > | callback_type |
Public Attributes | |
std::string | language |
The language we load the catalog for, like "ru", "en", "de". | |
std::string | country |
The country we load the catalog for, like "US", "IL". | |
std::string | variant |
Language variant, like "euro" so it would look for catalog like de_DE@euro. | |
std::string | encoding |
std::string | locale_category |
domains_type | domains |
std::vector< std::string > | paths |
callback_type | callback |
This structure holds all information required for creating gnu-gettext message catalogs,.
The user is expected to set its parameters to load these catalogs correctly. This structure also allows providing functions for charset conversion. Note, you need to provide them, so this structure is not useful for wide characters without subclassing and it will also ignore gettext catalogs that use a charset different from encoding.
typedef function< std::vector<char> std::string const &file_name, std::string const &encoding ) > booster::locale::gnu_gettext::messages_info::callback_type |
The callback for custom file system support. This callback should read the file named file_name encoded in encoding character set into std::vector<char> and return it.
typedef std::vector<domain> booster::locale::gnu_gettext::messages_info::domains_type |
Type that defines a list of domains that are loaded The first one is the default one
The callback for handling custom file systems, if it is empty, the real OS file-system is being used.
Message domains - application name, like my_app. So files named my_app.mo would be loaded
Required target charset encoding. Ignored for wide characters. For narrow, should specify the correct encoding required for this catalog
Locale category, is set by default to LC_MESSAGES, but may be changed
std::vector<std::string> booster::locale::gnu_gettext::messages_info::paths |
Paths to search files in. Under MS Windows it uses encoding parameter to convert them to wide OS specific paths.