Resource: IResourceObject;
The Resource property determines object of resources that should be exported.
Executing the example requires that the repository contains resources with the RESOURCES identifier. Russian and English languages should be in the given resources.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
ExpObj: ResourceExporter;
Cons: DtTextConsumer;
ResObj : IResourceObject;
CountrysArr: Array[0..1] Of String;
Begin
Cons := New DtTextConsumer.Create;
ExpObj := New ResourceExporter.Create;
MB := MetabaseClass.Active;
MObj := MB.ItemById("RESOURCES").Edit;
ResObj := MObj As IResourceObject;
Cons.File := "C:\Res.txt";
Cons.WriteHeader := True;
ExpObj.Consumer := Cons;
CountrysArr[0] := "ru";
CountrysArr[1] := "en";
ExpObj.Locales := CountrysArr;
ExpObj.Resource := ResObj;
ExpObj.Export;
End Sub Main;
After executing the example all resources strings referred to Russian and English languages are exported into the C:\Res.txt file.
See also: