locale imbue (const locale& loc);
ios_base::imbue(loc) and, if the stream is associated with a stream buffer, it also calls rdbuf()->pubimbue(loc).1
2
3
4
5
6
7
8
9
10
11
// imbue example
#include <iostream> // std::cout
#include <locale> // std::locale
int main()
{
std::locale mylocale(""); // get global locale
std::cout.imbue(mylocale); // imbue global locale
std::cout << 3.14159 << '\n';
return 0;
}
3,14159