I am trying to use
SetDefaultLang with an absolute path to the PO files.
SetDefaultLang (full_PO_name); does not work.
SetDefaultLang ('','',full_PO_name); does not work.
SetDefaultLang(Language_Name,full_path,only_filename_without_a_path); does not work.
SetDefaultLang('',full_path,only_filename_without_a_path); does not work.
https://dsiders.gitlab.io/lazdocsnext/lcl/lcltranslator/setdefaultlang.html says
Language ID requested for translated strings, or '' to use the system default., so for some reason the name of the language must always be supplied as a parameter.
I tried
SetDefaultLang(Language_Name,full_path,full_PO_name); but it still does not work.
I looked in
function SetDefaultLang(Lang: string; Dir: string = ''; LocaleFileName: string = ''; ForceUpdate: boolean = true): string;For some reason, it needs a value for
Lang 
I cropped
SetDefaultLang to the following procedure:
procedure SetAppLang(LocaleFileName: string = '');
var
LocalTranslator: TUpdateTranslator;
i: integer;
begin
LocalTranslator := nil;
Translations.TranslateResourceStrings(LocaleFileName);
LocalTranslator := TPOTranslator.Create(LocaleFileName);
// TranslateLCLResourceStrings(Lang, LocaleFileName);
if (LocalTranslator<>nil) then
begin
if Assigned(LRSTranslator) then
LRSTranslator.Free;
LRSTranslator := LocalTranslator;
for i := 0 to Screen.CustomFormCount-1 do
LocalTranslator.UpdateTranslation(Screen.CustomForms[i]);
for i := 0 to Screen.DataModuleCount-1 do
LocalTranslator.UpdateTranslation(Screen.DataModules[i]);
end;
end;
Now my app is localizable.
But I still wonder if there is a straightforward way. If there is not, do I need the
// TranslateLCLResourceStrings(Lang, LocaleFileName); ? I see no issues without it now, but maybe they will occur.