N
Noah Roberts
Localization is an area that I've yet to really deal with. I'm
attempting to figure out the standard library and finding the
documentation sparse at best. One particular area is the messages catalog.
I'm working in win32 using msvc++ and I stepped through the system with
a debugger. It appears that the entire localization system is broken.
All it does when you call messages:pen is return a catalog initialized
with the value -1. The fact that I'm not doing anything right or wrong
seems to be utterly moot.
Can someone help me understand why this might be? Are we required to
write the entire messages system from scratch? If so, and since locales
are immutable, how are we supposed to be able to do that?? Why does
there appear to be no actual implementation of this interface that does
anything?
Here's the code if it's really necessary. I'm attempting to open the
exe itself just as a first attempt because it appears to me that the
win32 way of getting message catalogs should be in string resources.
But I really have no idea what I'm doing. Like I said, the
documentation on this stuff is really crappy...even the books, which I'm
referencing an entire PILE of. Is there a halfway decent tutorial on
this anywhere? I've spent days in google digging around finding next to
nothing. I've never seen anything so hard to get information on.
#include <iostream>
#include <locale>
using namespace std;
int main(int argc, char * argv[])
{
std::locale loc("");
std::locale old = std::locale::global(loc);
std::string n1 = old.name();
std::string n2 = loc.name();
std::messages<char>::catalog cat = msgs.open("i18n-numerics.exe",loc);
if (cat != std::messages<char>::catalog(-1))
{
std::cout << "WORKED\n";
}
else
std::cout << "NO WORKY\n";
std::cin.get();
return 0;
}
attempting to figure out the standard library and finding the
documentation sparse at best. One particular area is the messages catalog.
I'm working in win32 using msvc++ and I stepped through the system with
a debugger. It appears that the entire localization system is broken.
All it does when you call messages:pen is return a catalog initialized
with the value -1. The fact that I'm not doing anything right or wrong
seems to be utterly moot.
Can someone help me understand why this might be? Are we required to
write the entire messages system from scratch? If so, and since locales
are immutable, how are we supposed to be able to do that?? Why does
there appear to be no actual implementation of this interface that does
anything?
Here's the code if it's really necessary. I'm attempting to open the
exe itself just as a first attempt because it appears to me that the
win32 way of getting message catalogs should be in string resources.
But I really have no idea what I'm doing. Like I said, the
documentation on this stuff is really crappy...even the books, which I'm
referencing an entire PILE of. Is there a halfway decent tutorial on
this anywhere? I've spent days in google digging around finding next to
nothing. I've never seen anything so hard to get information on.
#include <iostream>
#include <locale>
using namespace std;
int main(int argc, char * argv[])
{
std::locale loc("");
std::locale old = std::locale::global(loc);
std::string n1 = old.name();
std::string n2 = loc.name();
std::messages said:>(loc);
std::messages<char>::catalog cat = msgs.open("i18n-numerics.exe",loc);
if (cat != std::messages<char>::catalog(-1))
{
std::cout << "WORKED\n";
}
else
std::cout << "NO WORKY\n";
std::cin.get();
return 0;
}