7#ifndef BOOST_LOCLAE_GNU_GETTEXT_HPP
8#define BOOST_LOCLAE_GNU_GETTEXT_HPP
10#include <boost/locale/detail/is_supported_char.hpp>
11#include <boost/locale/message.hpp>
19# pragma warning(disable : 4251)
22namespace boost {
namespace locale {
27 namespace gnu_gettext {
36 messages_info() : language(
"C"), locale_category(
"LC_MESSAGES") {}
63 const size_t pos = n.find(
'/');
64 if(pos == std::string::npos) {
68 name = n.substr(0, pos);
69 encoding = n.substr(pos + 1);
94 typedef std::function<std::vector<char>(
const std::string& file_name,
const std::string& encoding)>
106 std::vector<std::string> get_lang_folders()
const;
111 template<
typename CharType,
class = boost::locale::detail::enable_if_is_supported_
char<CharType>>
a facet that holds general information about locale
Definition: info.hpp:26
message_format< CharType > * create_messages_facet(const messages_info &info)
This type represents GNU Gettext domain name for the messages.
Definition: gnu_gettext.hpp:52
domain(const std::string &n)
Definition: gnu_gettext.hpp:61
bool operator!=(const domain &other) const
Check whether two objects are distinct, only names are compared, encoding is ignored.
Definition: gnu_gettext.hpp:76
std::string encoding
The character encoding for the domain.
Definition: gnu_gettext.hpp:54
bool operator==(const domain &other) const
Check whether two objects are equivalent, only names are compared, encoding is ignored.
Definition: gnu_gettext.hpp:74
std::string name
The name of the domain.
Definition: gnu_gettext.hpp:53
This structure holds all information required for creating gnu-gettext message catalogs,...
Definition: gnu_gettext.hpp:35
std::string language
The language we load the catalog for, like "ru", "en", "de".
Definition: gnu_gettext.hpp:38
domains_type domains
Definition: gnu_gettext.hpp:81
std::vector< std::string > get_catalog_paths() const
Get paths to folders which may contain catalog files.
std::vector< std::string > paths
Definition: gnu_gettext.hpp:83
std::string locale_category
Definition: gnu_gettext.hpp:43
std::function< std::vector< char >(const std::string &file_name, const std::string &encoding)> callback_type
Definition: gnu_gettext.hpp:95
std::string encoding
Definition: gnu_gettext.hpp:41
callback_type callback
Definition: gnu_gettext.hpp:99
std::vector< domain > domains_type
Definition: gnu_gettext.hpp:79
std::string country
The country we load the catalog for, like "US", "IL".
Definition: gnu_gettext.hpp:39
std::string variant
Language variant, like "euro" so it would look for catalog like de_DE@euro.
Definition: gnu_gettext.hpp:40