Esempio n. 1
0
    public string GetLocale(string _id)
    {
        //lang = GameData.current.lang;

        if (!ready)        //LoadXmlData();
        {
            GameStrings.LoadData();
            ready = true;
        }

        //		if(_id == 0) return "";
        //
        //		switch(lang)
        //		{
        //		case "ru":
        //			_locale = localeList[_id-1].ru;
        //			break;
        //		case "en":
        //			_locale = localeList[_id-1].en;
        //			break;
        //		}

        string _locale = GameStrings.Instance.GetString(_id);

        return(_locale.Replace("\\n", "\n").Replace("[green]", "<color=#147832>").Replace("[/green]", "</color>"));
    }
Esempio n. 2
0
 void SwitchLanguage()
 {
     AudioManager.Instance.Play(0);
     GameData.current.lang = changeLanguages[currentLanguage];
     SaveLoadXML.SaveGameDataXML();
     GameStrings.LoadData();
     MainMenu.Instance.ReloadLanguage();
     Show();
 }