Hi,2012/7/10 Artyom Beilis <artyomtnk@yahoo.com>
>________________________________>Sent: Tuesday, July 10, 2012 4:16 PM
> From: NtVisigoth <ntvisigoth@gmail.com>
>To: boost-users@lists.boost.org
>Subject: Re: [Boost-users] Boost 1.49 Locale Conversion failed>I have :
>No
>1) Russian language Filename : g:\project\proba\locale\ru_RU.UTF-8\LC_MESSAGES\messages.mo
>2) Russian language locale name in С++-source:
>const std::string ruLanguage( "ru_RU" )
>
>
>Is it correct?
Filename : g:\project\proba\locale\ru\LC_MESSAGES\messages.mo
locale name in С++-source:"ru_RU.UTF-8"
See: http://www.boost.org/doc/libs/1_50_0/libs/locale/doc/html/messages_formatting.html
>
>
>I dont understand How Boost Locale finds languages MO-file by their locale names in C++-source.
Artyom Beilis
--------------
CppCMS - C++ Web Framework: http://cppcms.com/
CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-usersI written another proba-project:
const std::string strLanguagesPath( "g:\\source\\boost_locale\\languages\\" );const std::string strLanguageFilename( "messages" );const std::string strEnLanguage( "en_US.UTF-8" );const std::string strRuLanguage( "ru_RU.UTF-8" );
int main( int argc, char * argv[] ){using namespace std;using namespace boost::locale;
int exitCode = EXIT_SUCCESS;try{generator gen;
gen.add_messages_path( strLanguagesPath );gen.add_messages_domain( strLanguageFilename );
cout << "Start Boost.Locale proba" << endl;std::locale en_loc = gen( strEnLanguage );wcout << TREX( L"hello world", en_loc ) << endl;
std::locale ru_loc = gen( strRuLanguage );wcout << TREX( L"hello world", ru_loc ) << endl;cout << "Stop Boost.Locale proba" << endl;
File paths:g:\source\boost_locale\languages\en\LC_MESSAGES\messages.mog:\source\boost_locale\languages\ru\LC_MESSAGES\messages.mo
and I see in STDOUT following:Start Boost.Locale probaHello world LocalizedStop Boost.Locale probaPress any key to continue . . .
There no any russian strings in STDOUT. Why?