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. Change language

Change language

Scheduled Pinned Locked Moved C#
questionlearning
5 Posts 3 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.
  • Z Offline
    Z Offline
    Zhendalf
    wrote on last edited by
    #1

    Hi! In my program I have to change the language of user's input programmaticaly. User of course is able to do it by himself using CTRL+SHIFT or whatever. But I have to make it by myself. Is there any property that will allow me to do it?

    G H 2 Replies Last reply
    0
    • Z Zhendalf

      Hi! In my program I have to change the language of user's input programmaticaly. User of course is able to do it by himself using CTRL+SHIFT or whatever. But I have to make it by myself. Is there any property that will allow me to do it?

      G Offline
      G Offline
      Giorgi Dalakishvili
      wrote on last edited by
      #2

      Have a look at this: input language[^]

      #region signature my articles #endregion

      1 Reply Last reply
      0
      • Z Zhendalf

        Hi! In my program I have to change the language of user's input programmaticaly. User of course is able to do it by himself using CTRL+SHIFT or whatever. But I have to make it by myself. Is there any property that will allow me to do it?

        H Offline
        H Offline
        Hessam Jalali
        wrote on last edited by
        #3

        you can use System.Windows.Forms.InputLanguage Class to do this Installed Languages can be retrieved through InstalledInputLaguages property changing and retrieving current input language can be done through CurrentInputLanguage property here is an example to change the input language to Farsi

        foreach (InputLanguage lang in InputLanguage.InstalledInputLanguages)                
           if(lang.LayoutName == "Farsi")
           {                    
               InputLanguage.CurrentInputLanguage = lang;                  
               break;
           }
        

        ‌ and another way to change the language is through using cultures like

        InputLanguage.CurrentInputLanguage = InputLanguage.FromCulture(CultureInfo.CurrentCulture);

        good luck

        Z 2 Replies Last reply
        0
        • H Hessam Jalali

          you can use System.Windows.Forms.InputLanguage Class to do this Installed Languages can be retrieved through InstalledInputLaguages property changing and retrieving current input language can be done through CurrentInputLanguage property here is an example to change the input language to Farsi

          foreach (InputLanguage lang in InputLanguage.InstalledInputLanguages)                
             if(lang.LayoutName == "Farsi")
             {                    
                 InputLanguage.CurrentInputLanguage = lang;                  
                 break;
             }
          

          ‌ and another way to change the language is through using cultures like

          InputLanguage.CurrentInputLanguage = InputLanguage.FromCulture(CultureInfo.CurrentCulture);

          good luck

          Z Offline
          Z Offline
          Zhendalf
          wrote on last edited by
          #4

          Thanx a lot!

          1 Reply Last reply
          0
          • H Hessam Jalali

            you can use System.Windows.Forms.InputLanguage Class to do this Installed Languages can be retrieved through InstalledInputLaguages property changing and retrieving current input language can be done through CurrentInputLanguage property here is an example to change the input language to Farsi

            foreach (InputLanguage lang in InputLanguage.InstalledInputLanguages)                
               if(lang.LayoutName == "Farsi")
               {                    
                   InputLanguage.CurrentInputLanguage = lang;                  
                   break;
               }
            

            ‌ and another way to change the language is through using cultures like

            InputLanguage.CurrentInputLanguage = InputLanguage.FromCulture(CultureInfo.CurrentCulture);

            good luck

            Z Offline
            Z Offline
            Zhendalf
            wrote on last edited by
            #5

            oops. Sorry. I just realized that I need this change in Console, not in Windows.Forms.

            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