GetLanguage1Name() public method

public GetLanguage1Name ( string inLanguage ) : string
inLanguage string
return string
        private void UpdateDisplay()
        {
            _language1Name.Text = string.Format("{0} ({1})", _collectionSettings.GetLanguage1Name(LocalizationManager.UILanguageId), _collectionSettings.Language1Iso639Code);
            _language2Name.Text = string.Format("{0} ({1})", _collectionSettings.GetLanguage2Name(LocalizationManager.UILanguageId), _collectionSettings.Language2Iso639Code);

            if (string.IsNullOrEmpty(_collectionSettings.Language3Iso639Code))
            {
                _language3Name.Text          = "--";
                _removeLanguage3Link.Visible = false;
            }
            else
            {
                _language3Name.Text          = string.Format("{0} ({1})", _collectionSettings.GetLanguage3Name(LocalizationManager.UILanguageId), _collectionSettings.Language3Iso639Code);
                _removeLanguage3Link.Visible = true;
            }

            _restartReminder.Visible = _restartRequired;
            _okButton.Text           = _restartRequired ? LocalizationManager.GetString("CollectionSettingsDialog.Restart", "Restart", "If you make certain changes in the settings dialog, the OK button changes to this.") : LocalizationManager.GetString("Common.OKButton", "&OK");

            _xmatterPackCombo.Items.Clear();
            _xmatterPackCombo.Items.AddRange(_xmatterPackFinder.All.ToArray());
            _xmatterPackCombo.SelectedItem = _xmatterPackFinder.FindByKey(_collectionSettings.XMatterPackName);
            if (_xmatterPackCombo.SelectedItem == null)             //if something goes wrong
            {
                _xmatterPackCombo.SelectedItem = _xmatterPackFinder.FactoryDefault;
            }
        }
        private void UpdateDisplay()
        {
            string defaultFontText =
                LocalizationManager.GetString("CollectionSettingsDialog.BookMakingTab.DefaultFontFor", "Default Font for {0}", "{0} is a language name.");
            var lang1UiName = _collectionSettings.GetLanguage1Name(LocalizationManager.UILanguageId);
            var lang2UiName = _collectionSettings.GetLanguage2Name(LocalizationManager.UILanguageId);

            _language1Name.Text      = string.Format("{0} ({1})", lang1UiName, _collectionSettings.Language1Iso639Code);
            _language2Name.Text      = string.Format("{0} ({1})", lang2UiName, _collectionSettings.Language2Iso639Code);
            _language1FontLabel.Text = string.Format(defaultFontText, lang1UiName);
            _language2FontLabel.Text = string.Format(defaultFontText, lang2UiName);

            var lang3UiName = string.Empty;

            if (string.IsNullOrEmpty(_collectionSettings.Language3Iso639Code))
            {
                _language3Name.Text          = "--";
                _removeLanguage3Link.Visible = false;
                _language3FontLabel.Visible  = false;
                _fontComboLanguage3.Visible  = false;
                _fontSettings3Link.Visible   = false;
                _changeLanguage3Link.Text    = LocalizationManager.GetString("CollectionSettingsDialog.LanguageTab.SetThirdLanguageLink", "Set...", "If there is no third language specified, the link changes to this.");
            }
            else
            {
                lang3UiName                  = _collectionSettings.GetLanguage3Name(LocalizationManager.UILanguageId);
                _language3Name.Text          = string.Format("{0} ({1})", lang3UiName, _collectionSettings.Language3Iso639Code);
                _language3FontLabel.Text     = string.Format(defaultFontText, lang3UiName);
                _removeLanguage3Link.Visible = true;
                _language3FontLabel.Visible  = true;
                _fontComboLanguage3.Visible  = true;
                _fontSettings3Link.Visible   = true;
                _changeLanguage3Link.Text    = LocalizationManager.GetString("CollectionSettingsDialog.LanguageTab.ChangeLanguageLink", "Change...");
            }

            _restartReminder.Visible = AnyReasonToRestart();
            _okButton.Text           = AnyReasonToRestart() ? LocalizationManager.GetString("CollectionSettingsDialog.Restart", "Restart", "If you make certain changes in the settings dialog, the OK button changes to this.") : LocalizationManager.GetString("Common.OKButton", "&OK");
        }
Example #3
0
        private void UpdateDisplay()
        {
            string defaultFontText =
                LocalizationManager.GetString("CollectionSettingsDialog.BookMakingTab.DefaultFontFor", "Default Font for {0}", "{0} is a language name.");
            var lang1UiName = _collectionSettings.GetLanguage1Name(LocalizationManager.UILanguageId);
            var lang2UiName = _collectionSettings.GetLanguage2Name(LocalizationManager.UILanguageId);

            _language1Name.Text      = string.Format("{0} ({1})", lang1UiName, _collectionSettings.Language1Iso639Code);
            _language2Name.Text      = string.Format("{0} ({1})", lang2UiName, _collectionSettings.Language2Iso639Code);
            _language1FontLabel.Text = string.Format(defaultFontText, lang1UiName);
            _language2FontLabel.Text = string.Format(defaultFontText, lang2UiName);

            var lang3UiName = string.Empty;

            if (string.IsNullOrEmpty(_collectionSettings.Language3Iso639Code))
            {
                _language3Name.Text           = "--";
                _removeLanguage3Link.Visible  = false;
                _language3FontLabel.Visible   = false;
                _fontComboLanguage3.Visible   = false;
                _rtlLanguage3CheckBox.Visible = false;
                _changeLanguage3Link.Text     = LocalizationManager.GetString("CollectionSettingsDialog.LanguageTab.SetThirdLanguageLink", "Set...", "If there is no third language specified, the link changes to this.");
            }
            else
            {
                lang3UiName                   = _collectionSettings.GetLanguage3Name(LocalizationManager.UILanguageId);
                _language3Name.Text           = string.Format("{0} ({1})", lang3UiName, _collectionSettings.Language3Iso639Code);
                _language3FontLabel.Text      = string.Format(defaultFontText, lang3UiName);
                _removeLanguage3Link.Visible  = true;
                _language3FontLabel.Visible   = true;
                _fontComboLanguage3.Visible   = true;
                _rtlLanguage3CheckBox.Visible = true;
                _changeLanguage3Link.Text     = LocalizationManager.GetString("CollectionSettingsDialog.LanguageTab.ChangeLanguageLink", "Change...");
            }

            _restartReminder.Visible = _restartRequired;
            _okButton.Text           = _restartRequired ? LocalizationManager.GetString("CollectionSettingsDialog.Restart", "Restart", "If you make certain changes in the settings dialog, the OK button changes to this.") : LocalizationManager.GetString("Common.OKButton", "&OK");

            _xmatterPackCombo.Items.Clear();
            _xmatterPackCombo.Items.AddRange(_xmatterPackFinder.All.ToArray());
            _xmatterPackCombo.SelectedItem = _xmatterPackFinder.FindByKey(_collectionSettings.XMatterPackName);
            if (_xmatterPackCombo.SelectedItem == null)             //if something goes wrong
            {
                _xmatterPackCombo.SelectedItem = _xmatterPackFinder.FactoryDefault;
            }
        }