Scroll

Command line in Askiatranslator

Follow
Summary This article describes how to import and export translations using Translator via command line.
Applies to Translator Version 5.4.2 Onwards
Written for Survey Programmers
Keywords command line; automate; task; translator; commandline

Table of contents:

In the grand scheme of automation, you can now import the translations of the captions of a survey from the command line.

Inputs

The application is stored in the folder %programfiles(x86)%\Askia. The application name depends on the version of Suite you have installed:

TranslatorU.exe

5.4.4 and earlier  

Translator.exe

5.4.5 and later  

Here are the parameters which can be used:

Parameter

Type

Description

[None]

String*

Path of survey file. QES, QEW, QEX or XML filetypes only.

/translate

String*

Indicates the path and name of the translation file.

/copyidentical

Boolean

True if included. If this flag is set, all fields with identical text will be translated at the time of import (for the language being imported)

/importunchanged

Boolean

True if included. If you want to avoid over-writing any texts that may have changed in the QES file since the texts were exported, use this parameter

/reference

String

Abbreviation or ID of the language used for copying the strings when specifying copyidentical or importunchanged.

/export

String

The name of the output file.

/excludenonvisible

Boolean

True if included. Exclude the questions which are not visible during data entry.

/excluderouting

Boolean

True if included. Exclude routings.

/excludemessage

Boolean

True if included. Exclude system messages.

/excludetranslated

Boolean

True if included. Exclude strings which are already translated.

/excludeduplicates

Boolean

True if included. Exclude duplicate strings.

/headers

String

Comma separated list of names for headers in the export file.

/languages

String

Comma separated list of Language ID’s for to import or export.

* Required fields

Outcomes and Error codes

The process returns the number of strings changed if no errors occurred.

In case of errors, you will receive one of the following error codes:

Code

Description

-1

Cannot read the survey file

-2

Cannot save the survey file

-10

Cannot open the translation file

-11

Invalid translation file – file is empty

-12

Invalid translation file – file is not tab delimited

-13

Invalid translation file – Question ID not found

-14

Invalid translation file – Response ID not found

-15

Invalid translation file –Language not found in header

-16

Invalid translation file – Language not recognised in header

-17

Invalid translation file – Language ID not recognised

-18

Invalid translation file – Language not in survey

-19

Invalid translation file – Reference language not found

-20

Export file could not be created.

 

Examples

To export the English and French translations from a qex file called EX2000.qex, excluding system messages, and with the headers “Question, Response, English, French”.

TranslatorU.exe "C:\Qes\Me\Translate\EX2000.qex" /export:"C:\Qes\Me\Translate\Translation.txt" /excludemessage /headers:"Question,Response,English,French" /languages:"2057,1036"

 

To import all English translations from Translation.txt into a qex file called EX2000.qex whilst avoiding over-writing any texts that have changed in the QES file since the texts were exported

TranslatorU.exe "C:\Qes\Me\Translate\EX2000.qex" /translate:"C:\Qes\Me\Translate\Translation.txt" /importunchanged /reference:ENU

 Note: for version 5.4.5 and later the application name is: Translator.exe

Have more questions? Submit a request

Comments