Examples, Translation: removed GetDefaultLang reference, made TMainForm.SelectLanguage method use SetDefaultLang result

git-svn-id: trunk@61600 -
This commit is contained in:
maxim 2019-07-18 00:06:01 +00:00
parent 4f92041356
commit 3bbfbdcaac

View File

@ -149,7 +149,7 @@ begin
store language in a configuration file and apply that selection here. }
SelectLanguage('en');
{ OR: Start the program with system's default language:
SelectLanguage(GetDefaultLang); }
SelectLanguage(''); }
end;
{ Another example how to combine translated strings, in this case for a
@ -174,8 +174,10 @@ var
lang: String;
begin
// Switch language - this is in LCLTranslator
SetDefaultLang(ALang);
ALang := SetDefaultLang(ALang);
if ALang <> '' then
begin
// Switch default settings by calling the procedure provided in BasicLocalizedForm.pas.
UpdateFormatSettings(ALang);
@ -203,6 +205,7 @@ begin
{ Remember the new language. Forms may want to check in UpdateTranslation
whether the new language has a different BiDiMode. }
CurrentLang := ALang;
end;
end;
{ This method is inherited from LocalizedForm and manually inserts translated