private void btnAddLanguage_Click(object sender, RoutedEventArgs e) { try { Hashtable hashtable = new Hashtable(); SelectionListBoxDialog form = new SelectionListBoxDialog(); form.Text = "Select Language"; form.TopLabel.Text = "Select a language for the new translation:"; form.Icon = BIDSHelper.Resources.Common.BIDSHelper; form.HelpID = "sql11.asvs.cubeeditor.languageselection.f1"; foreach (CultureInfo info in CultureInfoCollection.Instance) { if (!info.IsNeutralCulture) { int lCID = info.LCID; if (!this._languages.Contains(lCID) //&& lCID != _defaultLanguage //allowing you to build a translation for the default language now, per http://www.sqlbi.com/articles/frictionless-renaming-in-tabular-models-with-analysis-services/ && !hashtable.ContainsKey(info.DisplayName)) { form.ListBox.Items.Add(info.DisplayName); hashtable.Add(info.DisplayName, info.LCID); } } } form.ListBox.Sorted = true; if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK && form.ListBox.SelectedItem != null) { int iLang = (int)hashtable[form.ListBox.SelectedItem.ToString()]; this._languages.Add(iLang); this._languages.Sort(); //make sure the languages will appear in the same order that they do the next time you open this dialog this.RefreshFields(); } this.dataGrid1.Focus(); } catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace, "BIDS Helper - Error"); } }