Exemplo n.º 1
0
        public async Task SetEnglishLanguage()
        {
            var    readLanguage = new StreamReader("./Data/localizations/EN_us.json");
            string json         = await readLanguage.ReadToEndAsync();

            readLanguage.Close();
            localizations = JsonSerializer.Deserialize <Localizations>(json);

            var setLanguageDefault = new StreamWriter("./Data/localizations/setting.txt");
            await setLanguageDefault.WriteAsync("EN_us");

            setLanguageDefault.Close();
            locale = LocaleEnum.EnUs;
        }
Exemplo n.º 2
0
        public async Task SetHungarianLanguage()
        {
            var    readLanguage = new StreamReader("./Data/localizations/HU_hu.json");
            string json         = await readLanguage.ReadToEndAsync();

            readLanguage.Close();
            localizations = JsonSerializer.Deserialize <Localizations>(json);

            var setLanguageDefault = new StreamWriter("./Data/localizations/setting.txt");
            await setLanguageDefault.WriteAsync("HU_hu");

            setLanguageDefault.Close();
            locale = LocaleEnum.HuHu;
        }