Search Unity

detect system language

Discussion in 'Scripting' started by peterbrinson, Jul 26, 2018.

  1. peterbrinson

    peterbrinson

    Joined:
    Jul 1, 2013
    Posts:
    63
    Checking for the system language sounds simple:
    Code (CSharp):
    1. print("language " + Application.systemLanguage);
    And to test, I go to Windows Settings, I change Country or Region as well as Languages, but my print statement always returns 'English'.

    Sorry, this may be an OS question as much as a Unity one, but what am I misunderstanding?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,742
    It probably is an OS thing. But one thing to try is to close/open the editor after changing locale. Also, it might require a system reboot to see, depending on OS configs.
     
  3. peterbrinson

    peterbrinson

    Joined:
    Jul 1, 2013
    Posts:
    63
    It indeed warned me that I needed to sign out to see the changes, and I didn't realize that meant I had to reboot. Thanks Kurt.