/// <summary> /// Changes localized text and messages /// </summary> /// <param name="locale"></param> /// <param name="firstTime"></param> protected virtual void ChangeUILanguage(string locale) { string imageProperties = this.toolStripStatusLabelDimValue.Text; // retain values of image properties in statusbar string totalPage = this.toolStripLabelPageNum.Text; FormLocalizer localizer = new FormLocalizer(this, typeof(GUI)); localizer.ApplyCulture(new CultureInfo(locale)); this.toolStripStatusLabel1.Text = null; foreach (Form form in this.OwnedForms) { HtmlHelpForm helpForm = form as HtmlHelpForm; if (helpForm != null) { helpForm.Text = Properties.Resources.VietOCR_Help; } } this.contextMenuStrip1.ChangeUILanguage(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GUI)); this.toolTip1.SetToolTip(this.buttonCollapseExpand, resources.GetString("buttonCollapseExpand.ToolTipText")); this.toolStripStatusLabelDimValue.Text = imageProperties; // restore prior values this.toolStripLabelPageNum.Text = totalPage; }
/// <summary> /// Changes localized text and messages /// </summary> /// <param name="locale"></param> /// <param name="firstTime"></param> protected override void ChangeUILanguage(string locale) { base.ChangeUILanguage(locale); FormLocalizer localizer = new FormLocalizer(this, typeof(GUIWithInputMethod)); localizer.ApplyCulture(new CultureInfo(locale)); }
/// <summary> /// Changes localized text and messages /// </summary> /// <param name="locale"></param> protected override void ChangeUILanguage(string locale) { base.ChangeUILanguage(locale); foreach (Form form in this.OwnedForms) { ChangeCaseDialog changeCaseDlg = form as ChangeCaseDialog; if (changeCaseDlg != null) { FormLocalizer localizer = new FormLocalizer(changeCaseDlg, typeof(ChangeCaseDialog)); localizer.ApplyCulture(new CultureInfo(locale)); break; } } }
/// <summary> /// Changes localized text and messages /// </summary> /// <param name="locale"></param> /// <param name="firstTime"></param> protected override void ChangeUILanguage(string locale) { base.ChangeUILanguage(locale); FormLocalizer localizer = new FormLocalizer(this, typeof(GUIWithInputMethod)); localizer.ApplyCulture(new CultureInfo(locale)); //this.overviewToolStripMenuItem.Text = strProgName + " " + Properties.Resources.Help; //this.aboutToolStripMenuItem.Text = Properties.Resources.About + " " + strProgName; //if (!String.IsNullOrEmpty(sourceEncoding)) //{ // this.comboBox1.Text = sourceEncoding; //} //this.comboBox1.SelectedItem = sourceEncoding; }
/// <summary> /// Changes localized text and messages /// </summary> /// <param name="locale"></param> /// <param name="firstTime"></param> protected virtual void ChangeUILanguage(string locale) { FormLocalizer localizer = new FormLocalizer(this, typeof(GUI)); localizer.ApplyCulture(new CultureInfo(locale)); if (imageTotal > 0) { this.lblCurIndex.Text = Properties.Resources.Page_ + (imageIndex + 1) + Properties.Resources._of_ + imageTotal; } this.toolStripStatusLabel1.Text = null; foreach (Form form in this.OwnedForms) { HtmlHelpForm helpForm = form as HtmlHelpForm; if (helpForm != null) { helpForm.Text = strProgName + Properties.Resources._Help; } } }
/// <summary> /// Changes localized text and messages /// </summary> /// <param name="locale"></param> /// <param name="firstTime"></param> public virtual void ChangeUILanguage(string locale) { FormLocalizer localizer = new FormLocalizer(this, typeof(WatchForm)); localizer.ApplyCulture(new CultureInfo(locale)); }
/// <summary> /// Changes localized text and messages /// </summary> /// <param name="locale"></param> /// <param name="firstTime"></param> public virtual void ChangeUILanguage(string locale) { FormLocalizer localizer = new FormLocalizer(this, typeof(OptionsDialog)); localizer.ApplyCulture(new CultureInfo(locale)); }
/// <summary> /// Changes localized text and messages /// </summary> /// <param name="locale"></param> /// <param name="firstTime"></param> protected override void UpdateUI(string locale) { base.UpdateUI(locale); FormLocalizer localizer = new FormLocalizer(this, typeof(GUIWithInputMethod)); localizer.ApplyCulture(new CultureInfo(locale)); //this.overviewToolStripMenuItem.Text = strProgName + " " + Properties.Resources.Help; //this.aboutToolStripMenuItem.Text = Properties.Resources.About + " " + strProgName; //if (!String.IsNullOrEmpty(sourceEncoding)) //{ // this.comboBox1.Text = sourceEncoding; //} //this.comboBox1.SelectedItem = sourceEncoding; }
/// <summary> /// Changes localized text and messages /// </summary> /// <param name="locale"></param> /// <param name="firstTime"></param> protected override void ChangeUILanguage(string locale) { base.ChangeUILanguage(locale); foreach (Form form in this.OwnedForms) { ChangeCaseDialog changeCaseDlg = form as ChangeCaseDialog; if (changeCaseDlg != null) { FormLocalizer localizer = new FormLocalizer(changeCaseDlg, typeof(ChangeCaseDialog)); localizer.ApplyCulture(new CultureInfo(locale)); break; } } }