Skip to content

Commit

Permalink
Use a better way to get the current system locale; add more explicit …
Browse files Browse the repository at this point in the history
…prompts for changing locale.
  • Loading branch information
SwimmingTiger committed Jul 7, 2022
1 parent 727c790 commit aca6e56
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions DragonbornSpeaksNaturally.SAMPLE-zhCN.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
[SpeechRecognition]

;;; 语音识别使用的语言,通常不需要设置,使用系统默认语言
;;; 如果要手动设置语言,请移除“Locale”前面的分号(;)。
;Locale=zh-CN

;;; 设为 1 在日志中记录录音问题,日志中会出现 "too loud" (声音太大) 和 "too noisy" (声音太小) 的记录。
Expand Down
1 change: 1 addition & 0 deletions DragonbornSpeaksNaturally.SAMPLE.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
[SpeechRecognition]

;;; Set this to override your system's default locale
;;; Remove the semicolon (;) in front of Locale before you change it.
;Locale=en-US

;;; When set to 1, the speech recognition service will log any audio signal issues like "too loud" or "too noisy"
Expand Down
2 changes: 1 addition & 1 deletion dsn_service/dsn_service/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Configuration {
private Regex optionalExpression = null;
private string optionalReplacement = "";

private CultureInfo locale = CultureInfo.InstalledUICulture;
private CultureInfo locale = CultureInfo.CurrentCulture;

public Configuration() {
iniFilePath = ResolveFilePath(CONFIG_FILE_NAMES);
Expand Down

0 comments on commit aca6e56

Please sign in to comment.