Translation from Command Line
|
<< Click to Display Table of Contents >> Navigation: Translation > Translation from Command Line |
To streamline workflows involving the translation of large volumes of files into one or more languages, translation tasks can be started from the command line.
EZTitles’ command-line interface is designed to eliminate the need for GUI interaction through an easy-to-use and easy-to-configure configuration file. It uses .ezt and .eztxml files as the source and outputs translated subtitles by either inserting a new language track into the original .ezt/.eztxml project or by replacing the active track.
As a result, translation tasks can be easily integrated into more complex automated workflows, such as:
1. A file supported by EZTitles products is received in Language A.
2. The file is converted to .ezt or .eztxml format using the EZConvert’s Watch Folder.
3. Upon successful conversion, a translation task is automatically triggered for the generated .ezt/.eztxml project.
4. The translated file is then passed back to the EZConvert Watch Folder for conversion to the original format.
5. A new file, in the preferred format and Language B, is produced and ready for further review or modification.
The following command can be used to start translation tasks from the command line:
EZTitles7 -translateCfg=<config.cfg> -translateIn=<.ezt or.eztxml file> -translateOut=<.ezt or .eztxml file>
translateCfg |
Sets the path to the configuration .cfg file that will be used during translation. All parameters available in the file are explained in the Configuration .cfg files annotated paragraph below. |
translateIn |
Specifies the path and the source .ezt or .eztxml that will be translated. |
translateOut |
Specifies the path and the output .ezt or .eztxml file that will have the new translation. |
-translatePrintOptions |
This parameter is optional and can be used when -translateCfg is specified to output the available language codes and formality options for the selected translation engine (DeepL or Google). |
The .cfg configuration file should be structured as shown in the sample below:
[Translation]
TranslationWalletID=
;DeepL or Google
Engine=
SourceLang=
TargetLang=
Formality=
; NewSubtitlesTrack (default), ReplaceOriginalSubtitles
TargetOptions=
Note: Lines starting with semi-colon (;) are intended as commentary and their only purpose is to serve as description of the particular parameters.
TranslationWalletID |
Specifies the particular Wallet ID with characters added to it. Can be copied and pasted from our website: Services Portal> Wallet Management. |
Engine |
For now the two options available are DeepL and Google. This parameter is Mandatory. |
SourceLang |
Specifies the language code of the subtitles in the source file. Please note that the two translation engines sometimes use different language codes for the same language. To check which code to use, first set the engine in the configuration file and then run the following command: EZTitles7 -translateCfg=<config.cfg> -translatePrintOptions This parameter is Mandatory. |
TargetLang |
Specifies the language code of the subtitles in the translated file. Please note that the two translation engines sometimes use different language codes for the same language. To check which code to use, first set the engine in the configuration file and then run the following command: EZTitles7 -translateCfg=<config.cfg> -translatePrintOptions This parameter is Mandatory. |
Formality |
Sets the formality level for this translation. Formality level is currently avaialble only for DeepL translations and varies for different languages. If the Formality parameter is left blank, the default level for the selected language will be used. To see the available options, create a .cfg file with the engine set to DeepL, then run the following command: EZTitles7 -translateCfg=<config.cfg> -translatePrintOptions This parameter is Optional. |
TargetOptions |
Two options are available: NewSubtitleTrack and ReplaceOriginalSubtitles NewSubtitleTrack ReplaceOriginalSubtitles This parameter is Mandatory. |