GetSystemLanguage() public method

Gets the system language for this application using Application.systemLanguage If its SystemLanguage.Unknown, a string with the value "Unknown" will be returned
public GetSystemLanguage ( ) : string
return string
Example #1
0
    void Start()
    {
        langManager = LanguageManager.Instance;

        string systemLang = langManager.GetSystemLanguage();
        if(langManager.IsLanguageSupported(systemLang))
            langManager.SetDefaultLanguage(systemLang);
    }
    void Start()
    {
        thisLanguageManager = LanguageManager.Instance;

        string systemLanguage = thisLanguageManager.GetSystemLanguage();
        if(thisLanguageManager.IsLanguageSupported(systemLanguage))
        {
            thisLanguageManager.ChangeLanguage(systemLanguage);
        }

        if(thisLanguageManager.AvailableLanguages.Count > 0)
        {
            currentLanguageValues = thisLanguageManager.GetTextDataBase();
        }
        else
        {
            Debug.LogError("No languages are created!, Open the Smart Localization plugin at Window->Smart Localization and create your language!");
        }
    }
Example #3
0
    void Start()
    {
        thisLanguageManager = LanguageManager.Instance;

        string systemLanguage = thisLanguageManager.GetSystemLanguage();

        if (thisLanguageManager.IsLanguageSupported(systemLanguage))
        {
            thisLanguageManager.ChangeLanguage(systemLanguage);
        }

        if (thisLanguageManager.AvailableLanguages.Count > 0)
        {
            currentLanguageValues = thisLanguageManager.GetTextDataBase();
        }
        else
        {
            Debug.LogError("No languages are created!, Open the Smart Localization plugin at Window->Smart Localization and create your language!");
        }
    }