Search Unity

[Windows App Store] Application.systemLanguage() - wrong lang...

Discussion in 'Windows' started by Nolex, Jan 27, 2015.

  1. Nolex

    Nolex

    Joined:
    Dec 10, 2010
    Posts:
    116
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,735
  3. Nolex

    Nolex

    Joined:
    Dec 10, 2010
    Posts:
    116
    No. This is for the localization of icons and descriptions.
     
  4. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,735
    According docs application has to declare supported languages in the manifest and that guide might help to do that.
    I haven't tried it myself, but it's quite likely an application will report only a supported language.
     
  5. Nolex

    Nolex

    Joined:
    Dec 10, 2010
    Posts:
    116
    No, It's a little different...

    I understood what the problem is.
    Application.systemLanguage() == System.Globalization.CultureInfo.CurrentCulture
    And this return default language for input, but not system!

    Example:
    My system lang OS: Ukrainian.
    Default lang for input: English.
    Addition lang for input: Ukrainian.

    Application.systemLanguage() return always English!

    It`s uncomfortable.
     
  6. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,918
    So what languages did you mark as supported in the manifest file?
     
  7. Nolex

    Nolex

    Joined:
    Dec 10, 2010
    Posts:
    116
    Only this in manifest:
    <Resource Language="x-generate" />

    BUT: Manifest and Application.systemLanguage() — it has no communication.

    If I put Ukrainian as the primary language, then the function returns Ukrainian.

    As far as I understand, in the manifest can not be specified languages. This is not Windows Phone 8 where just chose checkboxes in manifest and done!

    Languages on Windows Store Apps 8 — it`s uncomfortable.
    It does not seem to fix it, I will do further manual language selection.

    Thanks for advice.
     
  8. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,918
    If you really believe it's a bug, please fill a bug report and will take a look
     
  9. Nolex

    Nolex

    Joined:
    Dec 10, 2010
    Posts:
    116
    This trouble is not in Unity, but the fact that Microsoft poorly/uncomfortable implemented this feature.
     
  10. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,918
    Just in case, Application.systemLanguage is implemented inside Unity, internally the implementation looks something like this:
    Code (csharp):
    1.  
    2.         auto userLanguage = ref new Windows::Globalization::Language(Windows::System::UserProfile::GlobalizationPreferences::Languages->GetAt(0));
    3.         return ISOToSystemLanguage(userLanguage->LanguageTag);
    4.