diff --git a/SubtitleEdit.sln.DotSettings b/SubtitleEdit.sln.DotSettings
index aabb70e93..61e5bb287 100644
--- a/SubtitleEdit.sln.DotSettings
+++ b/SubtitleEdit.sln.DotSettings
@@ -25,6 +25,7 @@
True
True
True
+ True
True
True
True
diff --git a/src/ui/Forms/AudioToText/WhisperAudioToText.cs b/src/ui/Forms/AudioToText/WhisperAudioToText.cs
index 569e42ef4..65fd1f78a 100644
--- a/src/ui/Forms/AudioToText/WhisperAudioToText.cs
+++ b/src/ui/Forms/AudioToText/WhisperAudioToText.cs
@@ -16,7 +16,6 @@ using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
-using static Nikse.SubtitleEdit.Forms.Options.Settings;
using MessageBox = Nikse.SubtitleEdit.Forms.SeMsgBox.MessageBox;
namespace Nikse.SubtitleEdit.Forms.AudioToText
diff --git a/src/ui/Forms/Translate/AutoTranslate.Designer.cs b/src/ui/Forms/Translate/AutoTranslate.Designer.cs
index 033beca56..87c1fb49b 100644
--- a/src/ui/Forms/Translate/AutoTranslate.Designer.cs
+++ b/src/ui/Forms/Translate/AutoTranslate.Designer.cs
@@ -383,6 +383,7 @@
this.comboBoxSource.Size = new System.Drawing.Size(125, 23);
this.comboBoxSource.TabIndex = 94;
this.comboBoxSource.UsePopupWindow = false;
+ this.comboBoxSource.SelectedIndexChanged += new System.EventHandler(this.comboBoxSource_SelectedIndexChanged);
//
// comboBoxTarget
//
diff --git a/src/ui/Forms/Translate/AutoTranslate.cs b/src/ui/Forms/Translate/AutoTranslate.cs
index da27b5a85..be68f7e8a 100644
--- a/src/ui/Forms/Translate/AutoTranslate.cs
+++ b/src/ui/Forms/Translate/AutoTranslate.cs
@@ -2,6 +2,7 @@
using Nikse.SubtitleEdit.Core.AutoTranslate;
using Nikse.SubtitleEdit.Core.Common;
using Nikse.SubtitleEdit.Core.Translate;
+using Nikse.SubtitleEdit.Forms.Options;
using Nikse.SubtitleEdit.Logic;
using System;
using System.Collections.Generic;
@@ -576,13 +577,38 @@ namespace Nikse.SubtitleEdit.Forms.Translate
}
}
- public static void FillComboWithLanguages(NikseComboBox comboBox, IEnumerable languages)
+ public static void FillComboWithLanguages(NikseComboBox comboBox, List languages)
{
comboBox.Items.Clear();
- foreach (var language in languages)
+ var languagesFilled = false;
+
+ if (!string.IsNullOrEmpty(Configuration.Settings.General.DefaultLanguages))
{
- comboBox.Items.Add(language);
+ var favorites = Utilities.GetSubtitleLanguageCultures(true).ToList();
+ var languagesToAdd = new List();
+
+ foreach (var language in languages)
+ {
+ if (favorites.Any(p0 => p0.TwoLetterISOLanguageName == language.Code) ||
+ favorites.Any(p1 => p1.ThreeLetterISOLanguageName == language.Code) ||
+ (!string.IsNullOrWhiteSpace(language.Code) && favorites.Any(p2 => p2.TwoLetterISOLanguageName.StartsWith(language.Code, StringComparison.OrdinalIgnoreCase))) ||
+ favorites.Any(p3 => p3.EnglishName.Contains(language.Name, StringComparison.OrdinalIgnoreCase)) ||
+ favorites.Any(p4 => language.Name.Contains(p4.EnglishName, StringComparison.OrdinalIgnoreCase)))
+ {
+ languagesFilled = true;
+ languagesToAdd.Add(language);
+ }
+ }
+
+ comboBox.Items.AddRange(languagesToAdd.OrderBy(p => p.Name).ToArray