mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-27 22:25:43 +02:00
Examples, Translation: removed GetDefaultLang reference, made TMainForm.SelectLanguage method use SetDefaultLang result
git-svn-id: trunk@61600 -
This commit is contained in:
parent
4f92041356
commit
3bbfbdcaac
@ -149,7 +149,7 @@ begin
|
|||||||
store language in a configuration file and apply that selection here. }
|
store language in a configuration file and apply that selection here. }
|
||||||
SelectLanguage('en');
|
SelectLanguage('en');
|
||||||
{ OR: Start the program with system's default language:
|
{ OR: Start the program with system's default language:
|
||||||
SelectLanguage(GetDefaultLang); }
|
SelectLanguage(''); }
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Another example how to combine translated strings, in this case for a
|
{ Another example how to combine translated strings, in this case for a
|
||||||
@ -174,8 +174,10 @@ var
|
|||||||
lang: String;
|
lang: String;
|
||||||
begin
|
begin
|
||||||
// Switch language - this is in LCLTranslator
|
// 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.
|
// Switch default settings by calling the procedure provided in BasicLocalizedForm.pas.
|
||||||
UpdateFormatSettings(ALang);
|
UpdateFormatSettings(ALang);
|
||||||
|
|
||||||
@ -204,6 +206,7 @@ begin
|
|||||||
whether the new language has a different BiDiMode. }
|
whether the new language has a different BiDiMode. }
|
||||||
CurrentLang := ALang;
|
CurrentLang := ALang;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{ This method is inherited from LocalizedForm and manually inserts translated
|
{ This method is inherited from LocalizedForm and manually inserts translated
|
||||||
strings in cases where LCL/DefaultTranslator cannot do this. }
|
strings in cases where LCL/DefaultTranslator cannot do this. }
|
||||||
|
Loading…
Reference in New Issue
Block a user