8#ifndef BOOST_LOCALE_GNU_GETTEXT_HPP
9#define BOOST_LOCALE_GNU_GETTEXT_HPP
11#include <boost/locale/detail/is_supported_char.hpp>
12#include <boost/locale/message.hpp>
20# pragma warning(disable : 4251)
23namespace boost {
namespace locale {
28 namespace gnu_gettext {
37 messages_info() : language(
"C"), locale_category(
"LC_MESSAGES") {}
64 const size_t pos = n.find(
'/');
65 if(pos == std::string::npos) {
69 name = n.substr(0, pos);
70 encoding = n.substr(pos + 1);
95 typedef std::function<std::vector<char>(
const std::string& file_name,
const std::string& encoding)>
107 std::vector<std::string> get_lang_folders()
const;
112 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:53
domain(const std::string &n)
Definition gnu_gettext.hpp:62
bool operator!=(const domain &other) const
Check whether two objects are distinct, only names are compared, encoding is ignored.
Definition gnu_gettext.hpp:77
std::string encoding
The character encoding for the domain.
Definition gnu_gettext.hpp:55
bool operator==(const domain &other) const
Check whether two objects are equivalent, only names are compared, encoding is ignored.
Definition gnu_gettext.hpp:75
std::string name
The name of the domain.
Definition gnu_gettext.hpp:54
This structure holds all information required for creating gnu-gettext message catalogs,...
Definition gnu_gettext.hpp:36
std::string language
The language we load the catalog for, like "ru", "en", "de".
Definition gnu_gettext.hpp:39
domains_type domains
Definition gnu_gettext.hpp:82
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:84
std::vector< domain > domains_type
Definition gnu_gettext.hpp:80
std::string locale_category
Definition gnu_gettext.hpp:44
std::string encoding
Definition gnu_gettext.hpp:42
callback_type callback
Definition gnu_gettext.hpp:100
std::function< std::vector< char >(const std::string &file_name, const std::string &encoding)> callback_type
Definition gnu_gettext.hpp:96
std::string country
The country we load the catalog for, like "US", "IL".
Definition gnu_gettext.hpp:40
std::string variant
Language variant, like "euro" so it would look for catalog like de_DE@euro.
Definition gnu_gettext.hpp:41