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. Changing regional options in c#.net

Changing regional options in c#.net

Scheduled Pinned Locked Moved C#
csharpquestion
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.
  • R Offline
    R Offline
    RanjithLogics
    wrote on last edited by
    #1

    How can I change my system's Regional options (I want to change it to English-United states and also the datetime/currency formats) using c# code. If any one knows plz reply...urgent :-( Thanks in advance Ranjith Stephen

    N 1 Reply Last reply
    0
    • R RanjithLogics

      How can I change my system's Regional options (I want to change it to English-United states and also the datetime/currency formats) using c# code. If any one knows plz reply...urgent :-( Thanks in advance Ranjith Stephen

      N Offline
      N Offline
      Nader Elshehabi
      wrote on last edited by
      #2

      Hello I believe it's possible, yet not preferable!! Why, I won't like it at all if i install a program that misses up with my system's configuration. I'd start wondering what else did that program do in my system. Probable, I'd uninstall it immediately and make a system restore. The real question isn't how. It's why?? Why would you want to do such thing? My guess is that you are facing some trouble with the Date/Time or currency/numbers formatting, Right-To-Left issues and things like that. Post some details of your real problem, and maybe we can work it out, as changing the system's configuration to suit your formatting isn't the solution.

      Regards:rose:

      R 1 Reply Last reply
      0
      • N Nader Elshehabi

        Hello I believe it's possible, yet not preferable!! Why, I won't like it at all if i install a program that misses up with my system's configuration. I'd start wondering what else did that program do in my system. Probable, I'd uninstall it immediately and make a system restore. The real question isn't how. It's why?? Why would you want to do such thing? My guess is that you are facing some trouble with the Date/Time or currency/numbers formatting, Right-To-Left issues and things like that. Post some details of your real problem, and maybe we can work it out, as changing the system's configuration to suit your formatting isn't the solution.

        Regards:rose:

        R Offline
        R Offline
        RanjithLogics
        wrote on last edited by
        #3

        Hii thanx for ur reply. Bu t the thing is that I am modifying an existing appplication. There is a lot of calculations and using a lot of constants ( from ini files and hard coded strings .. etc). Moreover the application will be running in a dedicated system and there is no question of restoring it. I searched for API s which enables me changing the settings but i couldnt find any :-( Do you know any ??? thanks and Regards

        asdasd

        N 1 Reply Last reply
        0
        • R RanjithLogics

          Hii thanx for ur reply. Bu t the thing is that I am modifying an existing appplication. There is a lot of calculations and using a lot of constants ( from ini files and hard coded strings .. etc). Moreover the application will be running in a dedicated system and there is no question of restoring it. I searched for API s which enables me changing the settings but i couldnt find any :-( Do you know any ??? thanks and Regards

          asdasd

          N Offline
          N Offline
          Nader Elshehabi
          wrote on last edited by
          #4

          Hello You can't change the systems locale perminantly using any API -it would take much more than that to hack into windows restricted settings-. Anyway you can make a workaround it by changing the locale to your app's session only. Check Win APi SetLocaleInfo() function.

          Regards:rose:

          R 1 Reply Last reply
          0
          • N Nader Elshehabi

            Hello You can't change the systems locale perminantly using any API -it would take much more than that to hack into windows restricted settings-. Anyway you can make a workaround it by changing the locale to your app's session only. Check Win APi SetLocaleInfo() function.

            Regards:rose:

            R Offline
            R Offline
            RanjithLogics
            wrote on last edited by
            #5

            Hey It is possible..I mean no need to change the systems settings, but the application enviornment as you said . Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US" , true); will set the application settings into en-US , and our application will work in en-Us format Thanx Ranjith Stephen

            asdasd

            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