Ejemplo n.º 1
0
 public static TranslableString ToTransableString(this string str)
 {
     if (str.isTransableString())
     {
         string   defaultStr;
         string[] tokens = str.Split('}');
         if (tokens.Length == 1)
         {
             defaultStr = string.Empty;
         }
         else
         {
             defaultStr = tokens[1];
         }
         TranslableString translableString = new TranslableString(tokens[0].Substring(2), defaultStr);
         return(translableString);
     }
     else
     {
         throw new Exception("Not a transable string!");
     }
 }
Ejemplo n.º 2
0
 public override void Execute(params object[] param)
 {
     translableString = TranslateManager.Instance.Parse((Params as object[])[0].ToString());
 }