diff --git a/boost/locale/gnu_gettext.hpp b/boost/locale/gnu_gettext.hpp
index b739cbb..b9bf07e 100644
|
a
|
b
|
namespace gnu_gettext {
|
| 231 | 231 | template<typename CharType> |
| 232 | 232 | message_format<CharType> *create_messages_facet(catalog_info const &info); |
| 233 | 233 | |
| | 234 | /// |
| | 235 | /// Gets catalog information from a locale. |
| | 236 | /// |
| | 237 | template<typename CharType> |
| | 238 | catalog_info get_catalog_info(std::locale const& loc); |
| | 239 | |
| | 240 | /// \cond INTERNAL |
| | 241 | |
| | 242 | template<> |
| | 243 | BOOST_LOCALE_DECL catalog_info get_catalog_info<char>(std::locale const& loc); |
| | 244 | |
| | 245 | template<> |
| | 246 | BOOST_LOCALE_DECL catalog_info get_catalog_info<wchar_t>(std::locale const& loc); |
| | 247 | |
| | 248 | #ifdef BOOST_HAS_CHAR16_T |
| | 249 | template<> |
| | 250 | BOOST_LOCALE_DECL catalog_info get_catalog_info<char16_t>(std::locale const& loc); |
| | 251 | #endif |
| | 252 | |
| | 253 | #ifdef BOOST_HAS_CHAR32_T |
| | 254 | template<> |
| | 255 | BOOST_LOCALE_DECL catalog_info get_catalog_info<char32_t>(std::locale const& loc); |
| | 256 | #endif |
| | 257 | |
| | 258 | /// \endcond |
| 234 | 259 | |
| 235 | 260 | // ---- deprecated stuff goes there --- // |
| 236 | 261 | |
diff --git a/libs/locale/src/shared/message.cpp b/libs/locale/src/shared/message.cpp
index 5761f23..1c332c7 100644
|
a
|
b
|
namespace boost {
|
| 567 | 567 | mo_catalogs_.resize(domains.size()); |
| 568 | 568 | plural_forms_.resize(domains.size()); |
| 569 | 569 | |
| | 570 | _info.language(language); |
| | 571 | _info.country(country); |
| | 572 | _info.variant(variant); |
| | 573 | _info.encoding(encoding); |
| | 574 | _info.locale_category(lc_cat); |
| | 575 | |
| 570 | 576 | |
| 571 | 577 | for(unsigned id=0;id<domains.size();id++) { |
| 572 | 578 | std::string domain=domains[id].name(); |
| … |
… |
namespace boost {
|
| 580 | 586 | for(unsigned k=0;!found && k<formats.size();k++) { |
| 581 | 587 | std::string full_path = (format(formats[k]) % search_paths[i] % paths[j] % lc_cat % domain).str(std::locale::classic()); |
| 582 | 588 | found = load_file(full_path,encoding,key_encoding,id,inf.callback()); |
| | 589 | |
| | 590 | if(found) |
| | 591 | { |
| | 592 | _info.add_domain(domain); |
| | 593 | _info.add_path(search_paths[i]); |
| | 594 | _info.add_path_format(formats[k]); |
| | 595 | } |
| 583 | 596 | } |
| 584 | 597 | } |
| 585 | 598 | } |
| … |
… |
namespace boost {
|
| 591 | 604 | return runtime_conversion<char_type>(msg,buffer,key_conversion_required_,locale_encoding_,key_encoding_); |
| 592 | 605 | } |
| 593 | 606 | |
| | 607 | catalog_info get_info(void) const |
| | 608 | { |
| | 609 | return _info; |
| | 610 | } |
| | 611 | |
| 594 | 612 | virtual ~mo_message() |
| 595 | 613 | { |
| 596 | 614 | } |
| … |
… |
namespace boost {
|
| 746 | 764 | std::string locale_encoding_; |
| 747 | 765 | std::string key_encoding_; |
| 748 | 766 | bool key_conversion_required_; |
| | 767 | catalog_info _info; |
| 749 | 768 | }; |
| 750 | 769 | |
| 751 | 770 | |
| … |
… |
namespace boost {
|
| 884 | 903 | } |
| 885 | 904 | |
| 886 | 905 | |
| | 906 | template <typename CharType> |
| | 907 | catalog_info _get_catalog_info(std::locale const& loc) |
| | 908 | { |
| | 909 | typedef mo_message<CharType> facet_type; |
| | 910 | if(std::has_facet<facet_type>(loc)) |
| | 911 | return std::use_facet<facet_type>(loc).get_info(); |
| | 912 | else |
| | 913 | return catalog_info(); |
| | 914 | } |
| | 915 | |
| | 916 | template <> |
| | 917 | catalog_info get_catalog_info<char>(std::locale const& loc) |
| | 918 | { return _get_catalog_info<char>(loc); } |
| | 919 | |
| | 920 | template <> |
| | 921 | catalog_info get_catalog_info<wchar_t>(std::locale const& loc) |
| | 922 | { return _get_catalog_info<wchar_t>(loc); } |
| | 923 | |
| | 924 | #ifdef BOOST_HAS_CHAR16_T |
| | 925 | template <> |
| | 926 | catalog_info get_catalog_info<char16_t>(std::locale const& loc) |
| | 927 | { return _get_catalog_info<char16_t>(loc); } |
| | 928 | #endif |
| | 929 | |
| | 930 | #ifdef BOOST_HAS_CHAR32_T |
| | 931 | template <> |
| | 932 | catalog_info get_catalog_info<char32_t>(std::locale const& loc) |
| | 933 | { return _get_catalog_info<char32_t>(loc); } |
| | 934 | #endif |
| | 935 | |
| | 936 | |
| 887 | 937 | std::string catalog_info::language() const { return d->language; } |
| 888 | 938 | void catalog_info::language(std::string const &v) { d->language=v; } |
| 889 | 939 | |