I got a program written in unmanaged C++, I need to get the cultural info from the system and set that info to the current execution thread in my c++ application.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In unmanaged C++ on windows, what you need is the Locale. Culture is a term defined in .NET, as a replacement for that term.
There’s a whole host of functions, but the one where you need to start is called SetThreadLocale.
SetThreadLocale Function (Windows) @ MSDN
Within the documentation at MSDN, it appears that there are quirks in Vista. You may wish to consult the following function as well.
SetThreadUILanguage Function (Windows) @ MSDN
The other functions of interest are available here.
National Language Support Functions (Windows) @ MSDN
Multilingual User Interface Functions (Windows) @ MSDN
edit:
If you are developing an application with really basic support, setlocale() may also be of interest.
setlocale (C/C++) @ MSDN