| JH Trauntvein 2005-04-14, 9:01 pm |
| I am writing an application that is supposed to read a language
identifier from a registry value and use the appropriate set of
translated strings based upon this identifier. I can do this with no
problem. I would further like to use that language identifier to
govern the default behaviour of the c++ run time so that regional
settings are applied. In essence, what I would like to accomplish is
that when I create a locale using std::locale("") that this preferred
language identifier will be used instead of the operating system
default. I assume here the there is some machinery that initialises
the c++ run time using OS settings before WinMain() (or main()) is
executed. I am wondering if it is possible to access this machinery
after WinMain() has begun to execute. I realise that I could set the
global locale by calling std::locale::global() but this has side
effects that I don't want to deal with (I do a lot of protocol work and
not using the classic locale tends to mess up formatting at inopportune
times. For this reason, I use the local settings where needed and use
the classic locale everywhere else).
|