Fix for neutral cultures (Forms/ChooseLanguage)

This commit is contained in:
Waldi Ravens 2015-07-26 13:42:38 +02:00
parent e6eb4b7214
commit 6b97059ac2

View File

@ -74,12 +74,10 @@ namespace Nikse.SubtitleEdit.Forms
{
try
{
if (cultureName.Equals("zh-CHS", StringComparison.OrdinalIgnoreCase))
comboBoxLanguages.Items.Add(new CultureListItem(new CultureInfo(0x0004))); // zh-Hans
else if (cultureName.Equals("zh-tw", StringComparison.OrdinalIgnoreCase))
comboBoxLanguages.Items.Add(new CultureListItem(new CultureInfo(0x7C04))); // zh-Hant
else
comboBoxLanguages.Items.Add(new CultureListItem(CultureInfo.CreateSpecificCulture(cultureName)));
var ci = CultureInfo.CreateSpecificCulture(cultureName);
if (!ci.Name.Equals(cultureName, StringComparison.OrdinalIgnoreCase))
ci = CultureInfo.GetCultureInfo(cultureName);
comboBoxLanguages.Items.Add(new CultureListItem(ci));
}
catch (ArgumentException)
{