2012/7/10 Artyom Beilis <artyomtnk@yahoo.com>
>________________________________
> From: NtVisigoth <ntvisigoth@gmail.com>
>To: boost-users@lists.boost.org
>Sent: Tuesday, July 10, 2012 4:16 PM
>Subject: Re: [Boost-users] Boost 1.49 Locale Conversion failed>I have :
>
>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?

No

šš Filename : g:\project\proba\locale\ru\LC_MESSAGES\messages.mo
šš locale name in ó++-source:"ru_RU.UTF-8"


>
>
>I dont understand How Boost Locale finds languages MO-file by their locale names in C++-source.


See: http://www.boost.org/doc/libs/1_50_0/libs/locale/doc/html/messages_formatting.html
š

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-users

I 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.mo
g:\source\boost_locale\languages\ru\LC_MESSAGES\messages.mo

and I see in STDOUT following:
Start Boost.Locale proba
Hello world Localized
Stop Boost.Locale proba
Press any key to continue . . .

There no any russian strings in STDOUT. Why?