how to get the current window system language name?
-
Hi: How could I know if my windows is English version or the other language version(such as Chinese ,German ...)? I use GetLocaleInfo(LOCALE_SYSTEM_DEFAULT,LOCALE_IDEFAULTLANGUAGE ,szPath,6), but when I test it in English version and Chinese version windows system,it both returns "0804",Why? How should I do? Thanks benben.
-
Hi: How could I know if my windows is English version or the other language version(such as Chinese ,German ...)? I use GetLocaleInfo(LOCALE_SYSTEM_DEFAULT,LOCALE_IDEFAULTLANGUAGE ,szPath,6), but when I test it in English version and Chinese version windows system,it both returns "0804",Why? How should I do? Thanks benben.
Use
LOCALE_SLANGUAGE
instead ofLOCALE_IDEFAULTLANGUAGE
. Your buffer will need to be a bit bigger too ;) [edit] I usedLOCALE_USER_DEFAULT
instead ofLOCALE_SYSTEM_DEFAULT
so that it works if different users have different languages [/edit] Ryan Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact" -
Use
LOCALE_SLANGUAGE
instead ofLOCALE_IDEFAULTLANGUAGE
. Your buffer will need to be a bit bigger too ;) [edit] I usedLOCALE_USER_DEFAULT
instead ofLOCALE_SYSTEM_DEFAULT
so that it works if different users have different languages [/edit] Ryan Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact" -
You're welcome :) Ryan Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"