mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-24 20:22:41 +01:00
A few fixes for Chinese language (choose language/ocr)
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@179 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
a135467bf2
commit
1bb78834c5
@ -66,7 +66,10 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
try
|
||||
{
|
||||
comboBoxLanguages.Items.Add(new CultureListItem(CultureInfo.CreateSpecificCulture(cultureName)));
|
||||
if (string.Compare(cultureName, "zh-CHS", true) == 0)
|
||||
comboBoxLanguages.Items.Add(new CultureListItem(new CultureInfo(0x4)));
|
||||
else
|
||||
comboBoxLanguages.Items.Add(new CultureListItem(CultureInfo.CreateSpecificCulture(cultureName)));
|
||||
}
|
||||
catch (ArgumentException)
|
||||
{
|
||||
|
@ -1385,11 +1385,14 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
comboBoxTesseractLanguages.Items.Clear();
|
||||
foreach (var culture in System.Globalization.CultureInfo.GetCultures(System.Globalization.CultureTypes.NeutralCultures))
|
||||
{
|
||||
string trainDataFileName = dir + "\\" + culture.ThreeLetterISOLanguageName + ".traineddata";
|
||||
string tesseractName = culture.ThreeLetterISOLanguageName;
|
||||
if (culture.LCID == 0x4 && !File.Exists(dir + "\\" + tesseractName + ".traineddata"))
|
||||
tesseractName = "chi_sim";
|
||||
string trainDataFileName = dir + "\\" + tesseractName + ".traineddata";
|
||||
if (!list.Contains(culture.ThreeLetterISOLanguageName) && File.Exists(trainDataFileName))
|
||||
{
|
||||
list.Add(culture.ThreeLetterISOLanguageName);
|
||||
comboBoxTesseractLanguages.Items.Add(new TesseractLanguage { Id = culture.ThreeLetterISOLanguageName, Text = culture.EnglishName });
|
||||
comboBoxTesseractLanguages.Items.Add(new TesseractLanguage { Id = tesseractName, Text = culture.EnglishName });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user