From Clomosy Docs

(Created page with "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:'''<br> Change your device's language settings to Turkish or English so you can see this feature change. var MyForm:TclF...")
 
No edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
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.
<div class="alert alert-ligth border border-3 border-primary-subtle rounded-5 p-4 shadow-sm" role="alert">
function clStrToLan(const S:String):String;
</div>


BtnOk.Text := clStrToLan('Ok|Tamam');
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.<br>


'''Example:'''<br>
<b>Example</b><br>
<pre>
var
S : String;


Change your device's language settings to Turkish or English so you can see this feature change.
{
S = clStrToLan('Ok|Tamam');
ShowMessage(S);
}
</pre>


var
<b>Output:</b><br>
  MyForm:TclForm;
If the device's language is Turkish;<br>
  testBtn : TclButton;
<div class="alert alert-success" role="alert" data-bs-theme="light">
Tamam
procedure deviceLanguageSupport;
</div>
begin
If the device's language is English;<br>
  ShowMessage(clStrToLan('Ok|Tamam'));
<div class="alert alert-success" role="alert" data-bs-theme="light">
end;
Ok
</div>
begin
 
  MyForm := TclForm.Create(Self);
<h2> See Also </h2>
* [[System_Library#Cl_Utilities_Functions | Cl Utilities Functions]]
  testBtn:= MyForm.AddNewButton(MyForm,'testBtn','Send message according to device language support...');
{{#seo:|title=ClStrToLan Using in Clomosy - Clomosy Docs}}
  testBtn.TextSettings.Font.Size:=20;
{{#seo:|description=Learn how the clStrToLan function in Clomosy adapts text to the device's language settings, supporting English and Turkish localization.}}
  testBtn.Align := alCenter;
  testBtn.Height := 50;
  testBtn.Width := 300;
  MyForm.AddNewEvent(testBtn,tbeOnClick,'deviceLanguageSupport');
  MyForm.Run;
end;

Latest revision as of 15:17, 24 December 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.

Example

var
 S : String;

{
 S = clStrToLan('Ok|Tamam');
 ShowMessage(S);
}

Output:
If the device's language is Turkish;

If the device's language is English;

See Also