Reputation: 1794
In windows how to get the LCID from the std::locale
locale l1(".OCP");//get the default system locale
cout<<l1.c_str()<<endl;
In previous code i get the name of the locale but the win32 LCID this is the required one
Upvotes: 3
Views: 993
Reputation: 153840
The only identifying entity associated with a std::locale()
is its `name():
std::cout << l1.name() << '\n';
The content of this attribute is rather weakly specified but in the above setup it should have a name and yield something different from "*"
which is what is returned for unnamed locales. What the name is, isn't specified, however.
Upvotes: 1