From Clomosy Docs

Revision as of 11:09, 23 August 2024 by ClomosyManager (talk | contribs)

The clStrToLan function operates based on the language setting of the device where the application is being used. It processes by using the vertical bar '|' as a separator. The sentence on the left side of the separator is defined in English, while the one on the right side is defined in Turkish.

BtnOk.Text := clStrToLan('Ok|Tamam');

Example:

Change your device's language settings to Turkish or English so you can see this feature change.

TRObject Syntax
 var
  MyForm:TclForm;
  testBtn : TclButton;
 
 void deviceLanguageSupport;
 {
  ShowMessage(clStrToLan('Ok|Tamam'));
 }
 
 {
  MyForm = TclForm.Create(Self);
 
  testBtn= MyForm.AddNewButton(MyForm,'testBtn','Send message according to device language support...');
  testBtn.TextSettings.Font.Size=20;
  testBtn.Align = alCenter;
  testBtn.Height = 50;
  testBtn.Width = 300;
 
  MyForm.AddNewEvent(testBtn,tbeOnClick,'deviceLanguageSupport');
 
  MyForm.Run;
 }
Base Syntax
var
 MyForm:TclForm;
 testBtn : TclButton;

procedure deviceLanguageSupport;
begin
 ShowMessage(clStrToLan('Ok|Tamam'));
end;

begin
 MyForm := TclForm.Create(Self);

 testBtn:= MyForm.AddNewButton(MyForm,'testBtn','Send message according to device language support...');
 testBtn.TextSettings.Font.Size:=20;
 testBtn.Align := alCenter;
 testBtn.Height := 50;
 testBtn.Width := 300;

 MyForm.AddNewEvent(testBtn,tbeOnClick,'deviceLanguageSupport');

 MyForm.Run;
end;

See Also