From Clomosy Docs

No edit summary
No edit summary
Line 7: Line 7:
Change your device's language settings to Turkish or English so you can see this feature change.
Change your device's language settings to Turkish or English so you can see this feature change.


:'''Base Syntax'''
  var
  var
   MyForm:TclForm;
   MyForm:TclForm;
Line 29: Line 30:
   MyForm.Run;
   MyForm.Run;
  end;
  end;
:'''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;
  }


= See Also =
= See Also =
* [[Controls| Controls]]
* [[Controls| Controls]]

Revision as of 13:27, 12 February 2024

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.

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;
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;
 }

See Also