private static void LoadModLocale(string modName) { foreach (var localeName in GetAllModFiles(modName, "locale/en/")) { var loaded = ReadModFile(modName, localeName); using (var ms = new MemoryStream(loaded)) FactorioLocalization.Parse(ms); } }
private static void LoadModLocale(string modName, string locale) { foreach (var localeName in GetAllModFiles(modName, "locale/en/")) { var loaded = ReadModFile(modName, localeName); using (var ms = new MemoryStream(loaded)) FactorioLocalization.Parse(ms); } if (!string.IsNullOrEmpty(locale) && locale != "en") { foreach (var localeName in GetAllModFiles(modName, "locale/" + locale + "/")) { var loaded = ReadModFile(modName, localeName); using (var ms = new MemoryStream(loaded)) FactorioLocalization.Parse(ms); } } }