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. Programatically changing the User Locale

Programatically changing the User Locale

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
5 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.
  • A Offline
    A Offline
    a mulay
    wrote on last edited by
    #1

    How to programatically change the User Locale? In the NLS documentation it is mentioned that it is not possible, is there any way around for this? Thanks!

    D 1 Reply Last reply
    0
    • A a mulay

      How to programatically change the User Locale? In the NLS documentation it is mentioned that it is not possible, is there any way around for this? Thanks!

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      a.mulay wrote:

      How to programatically change the User Locale?

      How about setlocale()?


      "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

      "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

      A 1 Reply Last reply
      0
      • D David Crow

        a.mulay wrote:

        How to programatically change the User Locale?

        How about setlocale()?


        "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

        "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

        A Offline
        A Offline
        a mulay
        wrote on last edited by
        #3

        Thanks but this is not enough.:( setLocale() is specific to the current program, I need to modify User Local which we modify through the Control Panel --> Regional and Language Options --> Regional Settings. One way I found out is modifying the registry at the following location HKEY_CURRENT_USER --> Control Panel --> International --> Locale But I need an elegent solution.

        D 1 Reply Last reply
        0
        • A a mulay

          Thanks but this is not enough.:( setLocale() is specific to the current program, I need to modify User Local which we modify through the Control Panel --> Regional and Language Options --> Regional Settings. One way I found out is modifying the registry at the following location HKEY_CURRENT_USER --> Control Panel --> International --> Locale But I need an elegent solution.

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          a.mulay wrote:

          setLocale() is specific to the current program...

          It helps to specify all of your requirements up front.


          "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

          "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

          A 1 Reply Last reply
          0
          • D David Crow

            a.mulay wrote:

            setLocale() is specific to the current program...

            It helps to specify all of your requirements up front.


            "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

            "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

            A Offline
            A Offline
            a mulay
            wrote on last edited by
            #5

            DavidCrow wrote:

            It helps to specify all of your requirements up front.

            Yes, but the MSDN documentation also refers it as User Locale. http://msdn2.microsoft.com/en-us/library/ms776246.aspx[^] See under the column Standards and formats and against the row Purpose.

            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