Exemple #1
0
        //private string _lang = "EN";

        #endregion

        #region class helper

        private void updateLangauge()
        {
            foreach (Control c in this.Controls)
            {
                if (c is System.Windows.Forms.MenuStrip)
                {
                    System.Windows.Forms.MenuStrip mnu = c as System.Windows.Forms.MenuStrip;
                    mnu.Text = mnu.GetLanguageValue();

                    if (mnu.Items.Count > 0)
                    {
                        foreach (var mu in mnu.Items)
                        {
                            if (mu is System.Windows.Forms.ToolStripMenuItem)
                            {
                                System.Windows.Forms.ToolStripMenuItem _item = mu as System.Windows.Forms.ToolStripMenuItem;
                                _item.Text = _item.GetLanguageValue();
                                if (_item.DropDownItems.Count > 0)
                                {
                                    foreach (System.Windows.Forms.ToolStripItem item in _item.DropDownItems)
                                    {
                                        item.Text = item.GetLanguageValue();
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }