mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Issue #557: Override automatic language detection via registry setting "Language".
This commit is contained in:
@@ -47,6 +47,8 @@ uses
|
||||
{$R ..\..\res\manifest.RES}
|
||||
{$R ..\..\res\updater.RES}
|
||||
|
||||
var
|
||||
AppLanguage: String;
|
||||
begin
|
||||
// Use MySQL standard format for date/time variables: YYYY-MM-DD HH:MM:SS
|
||||
// Be aware that Delphi internally converts the slashes in ShortDateFormat to the DateSeparator
|
||||
@@ -61,6 +63,8 @@ begin
|
||||
AppSettings.Free;
|
||||
Application.Terminate;
|
||||
end else begin
|
||||
AppLanguage := AppSettings.ReadString(asAppLanguage);
|
||||
UseLanguage(AppLanguage);
|
||||
Application.Initialize;
|
||||
Application.Title := APPNAME;
|
||||
Application.UpdateFormatSettings := False;
|
||||
|
||||
@@ -172,7 +172,7 @@ type
|
||||
asFieldEditorSet, asFieldNullBackground, asGroupTreeObjects, asDisplayObjectSizeColumn, asSQLfile,
|
||||
asActionShortcut1, asActionShortcut2, asHighlighterForeground, asHighlighterBackground, asHighlighterStyle,
|
||||
asListColWidths, asListColsVisible, asListColPositions, asListColSort, asSessionFolder,
|
||||
asRecentFilter, asDateTimeEditorCursorPos);
|
||||
asRecentFilter, asDateTimeEditorCursorPos, asAppLanguage);
|
||||
TAppSetting = record
|
||||
Name: String;
|
||||
Session: Boolean;
|
||||
@@ -3113,6 +3113,7 @@ begin
|
||||
InitSetting(asSessionFolder, 'Folder', 0, False);
|
||||
InitSetting(asRecentFilter, '%s', 0, False, '', True);
|
||||
InitSetting(asDateTimeEditorCursorPos, 'DateTimeEditor_CursorPos_Type%s', 0);
|
||||
InitSetting(asAppLanguage, 'Language', 0, False, '');
|
||||
end;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user