Exemplo n.º 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;
    }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
    public static string Get(int id)
    {
        var config = LanguageConfig.Get(id);

        return(config == null ? string.Empty : config.content);
    }
Exemplo n.º 4
0
 public static string Get(string key)
 {
     return(LanguageConfig.Get(key).text);
 }