private void ChangetText() { if (!Application.isPlaying) { return; } if (!bIsKey) { return; } m_Key = this.text.TrimEnd(); string str = LanguageConfig.Get(m_Key).value; this.text = str; }
public static string GetFormat(int id, params object[] objects) { try { var config = LanguageConfig.Get(id); if (config != null) { return(string.Format(config.content, objects)); } else { return(string.Empty); } } catch (System.Exception ex) { Debug.Log(ex); return(string.Empty); } }
public static string Get(int id) { var config = LanguageConfig.Get(id); return(config == null ? string.Empty : config.content); }
public static string Get(string key) { return(LanguageConfig.Get(key).text); }