Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. how to get the current window system language name?

how to get the current window system language name?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestionannouncement
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    benben
    wrote on last edited by
    #1

    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.

    R 1 Reply Last reply
    0
    • B 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.

      R Offline
      R Offline
      Ryan Binns
      wrote on last edited by
      #2

      Use LOCALE_SLANGUAGE instead of LOCALE_IDEFAULTLANGUAGE. Your buffer will need to be a bit bigger too ;) [edit] I used LOCALE_USER_DEFAULT instead of LOCALE_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"

      B 1 Reply Last reply
      0
      • R Ryan Binns

        Use LOCALE_SLANGUAGE instead of LOCALE_IDEFAULTLANGUAGE. Your buffer will need to be a bit bigger too ;) [edit] I used LOCALE_USER_DEFAULT instead of LOCALE_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"

        B Offline
        B Offline
        benben
        wrote on last edited by
        #3

        Thanks Benben

        R 1 Reply Last reply
        0
        • B benben

          Thanks Benben

          R Offline
          R Offline
          Ryan Binns
          wrote on last edited by
          #4

          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"

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups