示例#1
0
    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;
    }
示例#2
0
文件: Language.cs 项目: Hengle/Fish
 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);
     }
 }
示例#3
0
文件: Language.cs 项目: Hengle/Fish
    public static string Get(int id)
    {
        var config = LanguageConfig.Get(id);

        return(config == null ? string.Empty : config.content);
    }
示例#4
0
 public static string Get(string key)
 {
     return(LanguageConfig.Get(key).text);
 }