I'm working on a large Unigui application and I'm facing a problem.
Form creation is handled by Unigui, so I have the following code to show an update form for a table:
Code: Select all
With UserManagementAddFrm do begin
Caption := LinkedLanguage.GetTextOrDefault('IDS_3' (* 'Toevoegen gebruiker' *) );
tbl_Sys_UsersEdit.Close;
lDynWhere := tbl_Sys_UsersEdit.DynamicWhere;
lDynWhere.Clear;
lDynWhere.Expression := lDynWhere.NewBinaryExpression('', 'UserId', dboEqual, 0);
tbl_Sys_UsersEdit.Open;
tbl_Sys_UsersEdit.Append;
ComboLanguage.ItemIndex := 0;
ShowModal(CallBackInsertUpdateUser);
end;
The problem is the following:
I have GetTextOrDefault items in the main screen and in the update screen.
The translator assigns ID's with the same number in both forms what is perfectly normal in a normal VCL application.
Is this case, the problem is that the translations of the ID's of the main form are used in the update screen.
Let's say I have the following in the main screen:
Code: Select all
Label1.Caption := LinkedLanguage.GetTextOrDefault('IDS_5' (* 'Hello' *) );
Code: Select all
Labelname.Caption := LinkedLanguage.GetTextOrDefault('IDS_5' (* 'Name:' *) );
At runtime the label LabelName gets the translation Hello where it should be Name:.
How can i fix this?
Do I need to have unique id's in the complete application?
Thx,
Bernaert Dominique