Example #1
0
        private void Awake()
        {
            Init();
            foreach (var langEnable in ApplicationManager.instance.appSettings.langAppEnable)
            {
                var langText = LoadLangText(langEnable.code);
                langTextList.Add(langText);
            }
            var commonText = LoadCommonLangText();

            langTextList.Add(commonText);
            _currentLang = ApplicationManager.instance.appSettings.defaultLanguage;
        }
Example #2
0
 /// <summary>
 /// Called whenever the OnLangChange event of the TextManager is triggered. Sets the text to its current lang value.
 /// </summary>
 /// <param name="lang"></param>
 private void OnLangChange(LangApp lang)
 {
     SetText();
 }
Example #3
0
 /// <summary>
 /// Sets the current language to the default language of the application as described in the game settings.
 /// </summary>
 public void SetDefaultLang()
 {
     currentLang = ApplicationManager.instance.appSettings.defaultLanguage;
 }
Example #4
0
 public bool Equals(LangApp other)
 {
     return(code == other.code && name == other.name && color == other.color);
 }