strings need translation before form is created
Posted: Thu Apr 12, 2007 3:42 pm
Hoo boy, we have gotten too tricky. The situation is this:
unit
interface
type
TfrmViewer = class(ancestor viewer with TsiLang component)
public
class function ShowItems (formCaption: String): Boolean;
end;
function ShowItems1: boolean;
function ShowItems2: boolean;
implementation
function ShowItems1: boolean;
begin
result := TfrmViewer.ShowItems('Widgets');
end;
function ShowItems2: boolean;
begin
result ;= TfrmViewer.ShowItems('Stuff');
end;
I need to access my global TsiLang component for the GetTextorDefault, not the inherited one on the form since it does not exist yet. Is that possible?
For the moment, I have changed this to pass in an integer value parameter instead of the string title and use it to assign the Form.Caption string after the form is created.
Note, There are other strings in the TfrmViewer procedures that will be translated by the inherited component.
unit
interface
type
TfrmViewer = class(ancestor viewer with TsiLang component)
public
class function ShowItems (formCaption: String): Boolean;
end;
function ShowItems1: boolean;
function ShowItems2: boolean;
implementation
function ShowItems1: boolean;
begin
result := TfrmViewer.ShowItems('Widgets');
end;
function ShowItems2: boolean;
begin
result ;= TfrmViewer.ShowItems('Stuff');
end;
I need to access my global TsiLang component for the GetTextorDefault, not the inherited one on the form since it does not exist yet. Is that possible?
For the moment, I have changed this to pass in an integer value parameter instead of the string title and use it to assign the Form.Caption string after the form is created.
Note, There are other strings in the TfrmViewer procedures that will be translated by the inherited component.