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#
  4. system language

system language

Scheduled Pinned Locked Moved C#
question
6 Posts 5 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.
  • U Offline
    U Offline
    User 589870
    wrote on last edited by
    #1

    hi, i have to get system language or code page in a string.like if it is set english(united states) it should return english in string.hw can i get that?

    P I M 3 Replies Last reply
    0
    • U User 589870

      hi, i have to get system language or code page in a string.like if it is set english(united states) it should return english in string.hw can i get that?

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #2

      System.Threading.Thread.CurrentThread.CurrentCulture.DisplayName or similar.

      1 Reply Last reply
      0
      • U User 589870

        hi, i have to get system language or code page in a string.like if it is set english(united states) it should return english in string.hw can i get that?

        I Offline
        I Offline
        Ice_Freez05
        wrote on last edited by
        #3

        try this one... string strLangName; strLangName = Thread.CurrentThread.CurrentCulture.Name;

        U 1 Reply Last reply
        0
        • I Ice_Freez05

          try this one... string strLangName; strLangName = Thread.CurrentThread.CurrentCulture.Name;

          U Offline
          U Offline
          User 589870
          wrote on last edited by
          #4

          i have changed language in control panel/regional and language/advanced to japanese but this is still returning me english.

          L 1 Reply Last reply
          0
          • U User 589870

            hi, i have to get system language or code page in a string.like if it is set english(united states) it should return english in string.hw can i get that?

            M Offline
            M Offline
            Michel Godfroid
            wrote on last edited by
            #5

            There is no 'real' system language anymore. Stuff like code pages is only used for applications which do not support UNICODE, and since windows is complete UNICODE, this means only legacy applications (and console applications). the following table[^] summarizes the various options quite nicely, and tells you which API to use to get at them.

            1 Reply Last reply
            0
            • U User 589870

              i have changed language in control panel/regional and language/advanced to japanese but this is still returning me english.

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              That's correct, the setting doesn't translate the strings. Do you have a Japanese version of Windows? What are you trying to achieve?

              I are Troll :suss:

              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