Difference between revisions of "Action: Translate Text"

m
 
(One intermediate revision by the same user not shown)
Line 12: Line 12:
 
</pre>
 
</pre>
 
''''' [https://macrodroidforum.com/wiki/index.php/Magic_text Magic Text] '''''
 
''''' [https://macrodroidforum.com/wiki/index.php/Magic_text Magic Text] '''''
<br>
 
  
 
=== Source language ===
 
=== Source language ===
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
Select the language of the text to be translated, you may need to download the language pack.
 
Select the language of the text to be translated, you may need to download the language pack.
</pre><br>
+
</pre>
  
 
=== Output language ===
 
=== Output language ===
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
Choose the text output language, you may need to download the language pack.
 
Choose the text output language, you may need to download the language pack.
</pre><br>
+
</pre>
  
 
=== Output String Variable ===
 
=== Output String Variable ===
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
You need a variable of type string to store the result of the translation.
 
You need a variable of type string to store the result of the translation.
</pre><br>
 
 
==<p><b>Example</b></p>==
 
 
''''' When you touch the floating button, it shows a variable dialog box for typing text and it will show you a dialog with the translation. '''''
 
<pre style="background-color: #AC2424; color: white; border-radius: 10px; padding: 10px;">
 
Triggers
 
 
Floating button (Translate)
 
</pre><br>
 
<pre style="background-color: #1665B0; color: white; border-radius: 10px; padding: 10px;">
 
Actions
 
 
Set Variable | Output: [User Prompt]
 
 
Translate Text| Spanish > English: {lv=Output}
 
 
Display Dialog | Output = Hello world
 
 
</pre>
 
</pre>
 
<pre style="background-color: #387F3D; color: white; border-radius: 10px; padding: 10px;">
 
Constraints
 
 
 
</pre>
 
 
<pre style="background-color: teal; color: white; border-radius: 10px; padding: 10px;">
 
Local variables
 
 
Output = Hello world
 
</pre><br>
 

Latest revision as of 23:14, 1 February 2024

About

This action uses on device translation, so the translation may be of a lower quality than some online services.

Available configuration

Enter text

Enter the text to translate.

Magic Text

Source language

Select the language of the text to be translated, you may need to download the language pack.

Output language

Choose the text output language, you may need to download the language pack.

Output String Variable

You need a variable of type string to store the result of the translation.