public static void Initialize(bool dontCheckSteam = false)
    {
        DebugUtil.LogArgs("Localization.Initialize!");
        bool flag = false;

        switch (GetSelectedLanguageType())
        {
        case SelectedLanguageType.Preinstalled:
        {
            string selectedPreinstalledLanguageCode = GetSelectedPreinstalledLanguageCode();
            if (!string.IsNullOrEmpty(selectedPreinstalledLanguageCode))
            {
                DebugUtil.LogArgs("Localization Initialize... Preinstalled localization");
                DebugUtil.LogArgs(" -> ", selectedPreinstalledLanguageCode);
                LoadPreinstalledTranslation(selectedPreinstalledLanguageCode);
            }
            else
            {
                flag = true;
            }
            break;
        }

        case SelectedLanguageType.UGC:
            if (!dontCheckSteam && SteamManager.Initialized && LanguageOptionsScreen.HasInstalledLanguage())
            {
                DebugUtil.LogArgs("Localization Initialize... SteamUGCService");
                PublishedFileId_t item = PublishedFileId_t.Invalid;
                LanguageOptionsScreen.LoadTranslation(ref item);
                if (item != PublishedFileId_t.Invalid)
                {
                    DebugUtil.LogArgs(" -> Loaded steamworks file id: ", item.ToString());
                }
                else
                {
                    DebugUtil.LogArgs(" -> Failed to load steamworks file id: ", item.ToString());
                }
            }
            else
            {
                flag = true;
            }
            break;

        case SelectedLanguageType.None:
            sFontAsset = GetFont(GetDefaultLocale().FontName);
            break;
        }
        if (flag)
        {
            ClearLanguage();
        }
    }
 public static void VerifyTranslationModSubscription(GameObject context)
 {
     if (GetSelectedLanguageType() == SelectedLanguageType.UGC && SteamManager.Initialized && !LanguageOptionsScreen.HasInstalledLanguage())
     {
         PublishedFileId_t invalid           = PublishedFileId_t.Invalid;
         PublishedFileId_t publishedFileId_t = new PublishedFileId_t((uint)KPlayerPrefs.GetInt("InstalledLanguage", (int)invalid.m_PublishedFileId));
         Label             label             = default(Label);
         label.distribution_platform = Label.DistributionPlatform.Steam;
         label.id = publishedFileId_t.ToString();
         Label  rhs = label;
         string arg = UI.FRONTEND.TRANSLATIONS_SCREEN.UNKNOWN;
         foreach (Mod mod in Global.Instance.modManager.mods)
         {
             if (mod.label.Match(rhs))
             {
                 arg = mod.title;
                 break;
             }
         }
         ClearLanguage();
         GameObject gameObject = KScreenManager.AddChild(context, ScreenPrefabs.Instance.ConfirmDialogScreen.gameObject);
         KScreen    component  = gameObject.GetComponent <KScreen>();
         component.Activate();
         ConfirmDialogScreen component2          = component.GetComponent <ConfirmDialogScreen>();
         ConfirmDialogScreen confirmDialogScreen = component2;
         string        title_text   = UI.CONFIRMDIALOG.DIALOG_HEADER;
         string        text         = string.Format(UI.FRONTEND.TRANSLATIONS_SCREEN.MISSING_LANGUAGE_PACK, arg);
         string        confirm_text = UI.FRONTEND.TRANSLATIONS_SCREEN.RESTART;
         System.Action on_confirm   = App.instance.Restart;
         confirmDialogScreen.PopupConfirmDialog(text, on_confirm, null, null, null, title_text, confirm_text, null, null, true);
     }
 }