Search Unity

Application.systemLanguage

Discussion in 'Android' started by iktakgames, Nov 15, 2013.

  1. iktakgames

    iktakgames

    Joined:
    Sep 5, 2012
    Posts:
    39
    Application.systemLanguage is not working on android on the last unity 4.3 .
    Can anyone test it? i have a samsung galaxy s2.
     
  2. imkc

    imkc

    Joined:
    Nov 16, 2013
    Posts:
    6
    not work on Nexus 7 neither:(
     
  3. iktakgames

    iktakgames

    Joined:
    Sep 5, 2012
    Posts:
    39
    this broked my games, where i can repair this?
     
  4. bitter

    bitter

    Unity Technologies

    Joined:
    Jan 11, 2012
    Posts:
    530
  5. iktakgames

    iktakgames

    Joined:
    Sep 5, 2012
    Posts:
    39
    (Case 575720) Application.systemLanguage not worrs on Android on the last‏


    But i dont receibed any response. Please i need a solution for this, because i need to upload my games because i have a bug in the game, but if upload with this, i will pain all my not english users...

    Thanks
     
  6. bitter

    bitter

    Unity Technologies

    Joined:
    Jan 11, 2012
    Posts:
    530
    Tnx! I found the issue. If you need an urgent fix you could try grabbing the language through JNI.

    Code (csharp):
    1. AndroidJavaObject locale = new AndroidJavaClass("java/util/Locale").CallStatic<AndroidJavaObject>("getDefault");
    2. string language = locale.Call<string>("getISO3Language");
    3.  
     
  7. iktakgames

    iktakgames

    Joined:
    Sep 5, 2012
    Posts:
    39
    Thanks! this works fine

    Y used this for get the two lines code.