예제 #1
0
 public void DoTranslate(string newRelativePath)
 {
     if (img == null)
     {
         img = GetComponent <Image>();
     }
     relativePath = newRelativePath;
     img.sprite   = LocalizationUtil.TranslateImg(relativePath);
 }
예제 #2
0
 public void DoTranslate(string k, params LocalizationInsert[] ins)
 {
     string[] insertV = SZ;
     if (ins != null)
     {
         int len = ins.Length;
         insertV = new string[len];
         for (int i = 0; i < len; ++i)
         {
             insertV[i] = ins[i].Translate();
         }
     }
     if (text == null)
     {
         text = GetComponent <Text>();
     }
     text.text = string.Format(LocalizationUtil.TranslateText(k), insertV);
     key       = k;
     inserts   = ins;
 }
예제 #3
0
 public string Translate()
 {
     return(needTranslate ? LocalizationUtil.TranslateText(insert) : insert);
 }