Пример #1
0
        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);
        }
Пример #2
0
        public static void LoadScriptableObject(this LanguageModule module, LanGroup group, bool reWrite = true)
        {
            var pairs = group.pairs;

            module.Load(pairs, reWrite);
        }
Пример #3
0
        public static void LoadJson(this LanguageModule module, string json, bool reWrite = true)
        {
            var pairs = JsonUtility.FromJson <List <LanPair> >(json);

            module.Load(pairs, reWrite);
        }
Пример #4
0
        public static void LoadXml(this LanguageModule module, string xml, bool reWrite = true)
        {
            var pairs = Xml.ToObject <List <LanPair> >(xml);

            module.Load(pairs, reWrite);
        }