public static void LoadCsv(this LanguageModule module, string path, bool reWrite = true) { DataReader dw = new DataReader(new StreamReader(path, System.Text.Encoding.UTF8), new DataRow(), new DataExplainer()); var pairs = dw.Get <LanPair>(); module.Load(pairs, reWrite); }
internal LanObserver(LanguageModule moudle, string key, SystemLanguage fallback, bool autoStart) { this._moudle = moudle; moudle._lanObservers.Add(this); this.key = key; this.fallback = fallback; moudle._observeEvent += ObserveEvent; _disposed = false; Pause(); if (autoStart) { Start(); } }
public static void LoadScriptableObject(this LanguageModule module, LanGroup group, bool reWrite = true) { var pairs = group.pairs; module.Load(pairs, reWrite); }
public static void LoadJson(this LanguageModule module, string json, bool reWrite = true) { var pairs = JsonUtility.FromJson <List <LanPair> >(json); module.Load(pairs, reWrite); }
public static void LoadXml(this LanguageModule module, string xml, bool reWrite = true) { var pairs = Xml.ToObject <List <LanPair> >(xml); module.Load(pairs, reWrite); }