LazResExplorer example: migrated to using GetLanguageID function from Translations unit

This commit is contained in:
Maxim Ganetsky 2023-06-12 17:15:43 +03:00
parent 53bda35072
commit 62623bb589

View File

@ -4,7 +4,7 @@ unit reConstsUnit;
interface
uses gettext, translations, LCLPlatformDef, InterfaceBase;
uses Translations, LCLPlatformDef, InterfaceBase;
resourcestring
sResourceExplorer = 'Resource explorer';
@ -58,10 +58,10 @@ end;
procedure TranslateResStrings;
var
Lang, FallbackLang: String;
LangID: TLanguageID;
begin
GetLanguageIDs(Lang,FallbackLang); // in unit gettext
TranslateUnitResourceStrings('reConstsUnit','languages'+DirectorySeparator+'resexplorer.%s.po', Lang,FallbackLang);
LangID := GetLanguageID;
TranslateUnitResourceStrings('reConstsUnit','languages'+DirectorySeparator+'resexplorer.%s.po', LangID.LanguageID, LangID.LanguageCode);
end;
initialization