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 can I get the ISO-Language identifier of the current user?

How can I get the ISO-Language identifier of the current user?

Scheduled Pinned Locked Moved C / C++ / MFC
questioncsharpc++
2 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.
  • E Offline
    E Offline
    Erik
    wrote on last edited by
    #1

    Hello, I am currently trying to get the default language of the current User-Settings from Windows, I have found that there is a Function called GetLocaleInfo, which returns a numeric language Identifier, when I pass LOCALE_ILANGUAGE. What I need now is a way of determining the three-character ISO-name of that language, i.e. ARA for Arabic BGR for Bulgarian CAT for Catalan DAN for Danish DEU for German ELL for Greek ENU for English ESP for Spanish FIN for Finnish and so on. In .NET, there is a class called "CultureInfo", however, I need this for my MFC project. Is there a way to get the ISO-language of the user?

    O 1 Reply Last reply
    0
    • E Erik

      Hello, I am currently trying to get the default language of the current User-Settings from Windows, I have found that there is a Function called GetLocaleInfo, which returns a numeric language Identifier, when I pass LOCALE_ILANGUAGE. What I need now is a way of determining the three-character ISO-name of that language, i.e. ARA for Arabic BGR for Bulgarian CAT for Catalan DAN for Danish DEU for German ELL for Greek ENU for English ESP for Spanish FIN for Finnish and so on. In .NET, there is a class called "CultureInfo", however, I need this for my MFC project. Is there a way to get the ISO-language of the user?

      O Offline
      O Offline
      oobimoo
      wrote on last edited by
      #2

      If you scroll down at the list[^] youll see the LOCALE_SISO639LANGNAME2 which is for the three letter iso, but its only for >=Vista. The xp compatible LOCALE_SISO639LANGNAME its the two letter version.

      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