public static void Add(string key, string value) { if (mMsg == null) { BlockResMgr.Get().LoadI18n(); } mMsg[key] = value; }
public static bool Contains(string key) { if (mMsg == null) { BlockResMgr.Get().LoadI18n(); } return(mMsg.ContainsKey(key)); }
public static string Get(string key) { if (mMsg == null) { BlockResMgr.Get().LoadI18n(); } string value; if (mMsg.TryGetValue(key, out value)) { return(value); } throw new Exception("I18n file doesn't contain translation for key: " + key); }
/// <summary> /// Initialize blockly model. Called very first when start blockly /// </summary> public static void Init() { BlockResMgr.Get().LoadI18n(I18n.EN); BlockResMgr.Get().LoadJsonDefinitions(); }
/// <summary> /// Initialize blockly model. Called very first when start blockly /// </summary> public static void Init(bool localize = true) { BlockResMgr.Get().LoadI18n(localize); BlockResMgr.Get().LoadJsonDefinitions(); }