How can I check, which value should I pass to std::locale
? I wrote simple program:
#include <cstdio>
#include <locale>
#include <stdexcept>
int main()
{
try
{
std::locale("plk_pol");
}
catch(std::runtime_error)
{
printf("Can't load locale.\n");
return 1;
}
return 0;
}
But it gives me error message. That's strange, because std::setlocale(LC_ALL, 'plk_pol');
works. I tried other values, like pl_PL
, polish_poland
- behaviour is the same. Even en_US.utf8
gives error. The only locale I was able to set is C
.
I have Windows 7 with Polish localisation set. The question is: where can I check, which locales are acceptable in my system?