#include<iostream>
#include<iomanip> // std::endl
#include<string>
#include<algorithm> // transform

int main()
{
		const std::string localename = getenv("LANG");
		std::cout << localename << std::endl;
        std::locale::global(std::locale(localename.c_str()));
        std::wcout.imbue(std::locale());

        std::wstring wstr=L"ПривЕт";

        transform(wstr.begin(), wstr.end(), wstr.begin(), towlower);

        std::wcout << wstr << std::endl;
}