DLT. - DeepL Translate

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > DLT. - DeepL-Translate >

DLT. - DeepL Translate

DLT.Get Source Language

Previous Top Next


MiniRobotLanguage (MRL)

 

DLT.Get Source Language

Gets the source language found by DeepL AI

 

 

Intention

 

This command retrieves the source language detected by the DeepL translation service. The source language is determined based on the input text provided for translation. The detected source language is returned as a two-letter language code (e.g., "EN" for English, "DE" for German).
The source language is returned as a two-letter language code. For a list of language codes, refer to the DeepL API documentation.

The index parameter (P1) is used when multiple languages are detected in the input text. The index refers to the position of the detected language in the list of languages, starting from 0.

This command is not directly related to the DLT.Set Source Language command. While both commands deal with source languages, they serve different purposes and use different registers. The DLT.Set Source Language command is used to specify the source language for translation, while the DLT.Get Source Language command is used to retrieve the source language detected by the DeepL service.

 

' This command will retrieve the source language at index 1 and store the result in the $$SRC variable.
DLT.Get Source Language|$$SRC|1

 
' This command will retrieve the source language at the default index (0) and store the result in the $$SRC variable.

DLT.Get Source Language|$$SRC

 

 

Syntax

 

 

DLT.Get Source Language[|P1][|P2]

 

 

Parameter Explanation

 

P1 - (optional) A variable to store the detected source language. If the variable is not provided or is empty, the result will be placed on top of the stack.

 

P2 - (optional) An optional variable containing the index of the source language. If not provided, the default value is 0.

 

 

 

 

Example

 

'***********************************

'

'***********************************

 

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also:

 

    1.6.1. Program Flow Control

    ! Smart Package Robot 's Parallel Robot Operations

    1.5. Features and Hints