private string GetString(Language_lauguage language) { if (!m_LanguageIDMap.ContainsKey(this.CurrentLanguage)) { return(language.EN); } string key = m_LanguageIDMap[this.CurrentLanguage]; if (key != null) { if (< > f__switch$map6 == null) { Dictionary <string, int> dictionary = new Dictionary <string, int>(11) { { "CN_s", 0 }, { "CN_t", 1 }, { "EN", 2 }, { "FR", 3 }, { "DE", 4 }, { "ID", 5 }, { "JP", 6 }, { "KR", 7 }, { "PT_BR", 8 }, { "RU", 9 }, { "ES_ES", 10 } };
public string GetEquipSpecialInfo(int equipid) { object[] args = new object[] { equipid }; string key = Utils.FormatString("装备特性描述{0}", args); string str2 = string.Empty; Language_lauguage _lauguage = null; if (this.m_LanguageList.TryGetValue(key, out _lauguage)) { str2 = this.GetString(_lauguage); } return(str2); }
public string GetLanguageByTID(string tid, params object[] args) { this.argsLength = args.Length; Language_lauguage _lauguage = null; this.m_LanguageList.TryGetValue(tid, out _lauguage); if (_lauguage == null) { object[] objArray1 = new object[] { tid }; SdkManager.Bugly_Report("GetLanguageByTID", Utils.FormatString("TID:[{0}] is not invalid.", objArray1)); return(string.Empty); } this.currentstring = this.GetString(_lauguage); this.geti = 1; while (this.geti <= this.argsLength) { object[] objArray2 = new object[] { "%s", this.geti }; this.containstring = Utils.GetString(objArray2); if (this.currentstring.Contains(this.containstring)) { this.currentstring = this.currentstring.Replace(this.containstring, args[this.geti - 1].ToString()); } else { SdkManager.Bugly_Report("LanguageManager.GetLanguageByTID", this.CurrentLanguage.ToString() + " tid:" + tid + " dont have " + this.containstring); } this.geti++; } object[] objArray3 = new object[] { "%s", this.geti }; if (this.currentstring.Contains(Utils.GetString(objArray3))) { SdkManager.Bugly_Report("LanguageManager.GetLanguageByTID", " tid:" + tid + " need more args!!!!"); } this.currentstring = this.currentstring.Replace(@"\n", "\n"); return(this.currentstring); }