Exemplo n.º 1
0
 public static void ActivateLocale(string localeCode, ContentManager content)
 {
     if (localeCode == "en-us")
     {
         LocaleTerms.ClearForEnUS();
     }
     else
     {
         string str1 = "Content/Locales/" + localeCode + "/UI_Terms.txt";
         string path = "Content/Locales/" + localeCode + "/Hacknet_UI_Terms.txt";
         if (!File.Exists(str1))
         {
             if (!File.Exists(path))
             {
                 throw new NotSupportedException("Locale " + localeCode + " does not exist or is not supported");
             }
             str1 = path;
         }
         LocaleTerms.ReadInTerms(str1, true);
         if (DLC1SessionUpgrader.HasDLC1Installed)
         {
             string str2 = "Content/Locales/" + localeCode + "/DLC/Hacknet_UI_Terms.txt";
             if (File.Exists(str2))
             {
                 LocaleTerms.ReadInTerms(str2, false);
             }
         }
     }
     Settings.ActiveLocale = localeCode;
     LocaleFontLoader.LoadFontConfigForLocale(localeCode, content);
     FileEntry.init(content);
 }