Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::locale::gnu_gettext::messages_info Struct Reference

This structure holds all information required for creating gnu-gettext message catalogs,. More...

#include <gnu_gettext.hpp>

Collaboration diagram for boost::locale::gnu_gettext::messages_info:

Classes

struct  domain
 This type represents GNU Gettext domain name for the messages. More...
 

Public Types

typedef std::vector< domaindomains_type
 Type that defines a list of domains that are loaded The first one is the default one. More...
 
typedef function< std::vector
< char > std::string const
&file_name, std::string const
&encoding) > 
callback_type
 The callback for custom file system support. More...
 

Public Member Functions

 messages_info ()
 

Public Attributes

std::string language
 The language we load the catalog for, like "ru", "en", "de". More...
 
std::string country
 The country we load the catalog for, like "US", "IL". More...
 
std::string variant
 Language variant, like "euro" so it would look for catalog like de_DE@euro. More...
 
std::string encoding
 Required target charset encoding. More...
 
std::string locale_category
 Locale category, is set by default to LC_MESSAGES, but may be changed. More...
 
domains_type domains
 Message domains - application name, like my_app. More...
 
std::vector< std::string > paths
 Paths to search files in. More...
 
callback_type callback
 The callback for handling custom file systems, if it is empty, the real OS file-system is being used. More...
 

Detailed Description

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.

Member Typedef Documentation

typedef function< std::vector<char> std::string const &file_name, std::string const &encoding ) > boost::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.

  • If the file does not exist, it should return an empty vector.
  • If a error occurs during file read it should throw a error.
Note
The user should support only the encodings the locales are created for. So if the user uses only one encoding or the file system is encoding agnostic, he may ignore the encoding parameter.

Type that defines a list of domains that are loaded The first one is the default one.

Constructor & Destructor Documentation

boost::locale::gnu_gettext::messages_info::messages_info ( )
inline

Member Data Documentation

callback_type boost::locale::gnu_gettext::messages_info::callback

The callback for handling custom file systems, if it is empty, the real OS file-system is being used.

std::string boost::locale::gnu_gettext::messages_info::country

The country we load the catalog for, like "US", "IL".

domains_type boost::locale::gnu_gettext::messages_info::domains

Message domains - application name, like my_app.

So files named my_app.mo would be loaded

std::string boost::locale::gnu_gettext::messages_info::encoding

Required target charset encoding.

Ignored for wide characters. For narrow, should specify the correct encoding required for this catalog

std::string boost::locale::gnu_gettext::messages_info::language

The language we load the catalog for, like "ru", "en", "de".

std::string boost::locale::gnu_gettext::messages_info::locale_category

Locale category, is set by default to LC_MESSAGES, but may be changed.

std::vector<std::string> boost::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.

std::string boost::locale::gnu_gettext::messages_info::variant

Language variant, like "euro" so it would look for catalog like de_DE@euro.


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