public static string GetLocalFormat(int id, params object[] objects) { try { var config = PriorLanguageConfig.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); } }
public static PriorLanguageConfig Get(int id) { if (!inited) { Debug.Log("PriorLanguageConfigConfig 还未完成初始化。"); return(null); } if (configs.ContainsKey(id)) { return(configs[id]); } PriorLanguageConfig config = null; if (rawDatas.ContainsKey(id)) { config = configs[id] = new PriorLanguageConfig(rawDatas[id]); rawDatas.Remove(id); } return(config); }
public static void PreInit() { PriorLanguageConfig.Init(); }
public static string GetLocal(int id) { var config = PriorLanguageConfig.Get(id); return(config == null ? string.Empty : config.content); }