How do I change the system language in windows programmatically?
Windows server 2008 rc2 system
Calls
setlocale(LC_ALL,"Rus");
setlocale( LC_ALL, "ru_RU.CP1251" );
std::system("chcp 1251");
не прокатывают
GetACP () function (from winnls.h) returns 1252, and should return 1251.
If you manually change the system language Control panel-Clock, language and region - language and regional standards-advanced-language of programs that do not support unicode.
In Russian then GetACP () returns 1251.
- Is it possible to do this?
- Is it possible to do this without connecting non-standard ones libraries?
4
1 answers
Changing Non-Unicode programmatically to Russian.
You need the function NtSetDefaultLocale
. From the user-accessible interface of the Windows libraries, the most suitable SetLocaleInfo
, but according to the description, it will be too weak for your task =(
P.S. Found it!
Try it out SystemParametersInfo
with SPI_SETDEFAULTINPUTLANG
. I never would have guessed!!!
3
Author: gecube, 2012-10-10 14:14:19