EPLAN.EPLAN21.TRANSLATE.OFFLINE

Contents

Description

Starts an offline translation of the defined objects.

Parameters

All parameters of this command have the prefix EPL_PARAM_TRANSLATE_OFFLINE_.

ParameterID Type Description
SELECTION [IN]
EplHandle
Iterator with the objects to be translated.
LANGUAGE [IN, OPTIONAL]
String
Optional parameter determining the source language for the offline translation. The country code is indicated (DE for German, EN for English, etc.) The default values are taken from the Settings dialog.
DESTLANGUAGES [IN, OPTIONAL]
String
Optional parameter determining the target languages for the offline translation. The country codes (DE for German, EN for English, etc.) are indicated without separator (e.g. DEEN for German and English). The settings in the Settings dialog are default settings.
OUTPUT_TYPE [IN, OPTIONAL]
Integer
Optional parameter determining the output method for the offline translation. Possible values are 0 (display all languages), 1 (only display the language specified in the Settings dialog), or 2 (display fixed languages; they are transferred in the FIX_LANGUAGES parameter or taken from the property values).
FIX_LANGUAGES [IN, OPTIONAL]
String
Optional parameter determining the specified display languages for the offline translation. The country codes (DE for German, EN for English, etc.) are indicated without separator (e.g. DEEN for German and English). This parameter is only evaluated, if the OUTPUT_TYPE parameter is set to "2".
CHANGE_OUTPUT_TYPE [IN, OPTIONAL]
Boolean
Optional parameter determining whether the output method of the multilingual properties is to be changed or retained.

Error Messages

The eplExecuteCommand function returns EPL_OK if the command could be successfully executed.

If the command fails, eplExecuteCommand returns the value EPL_ERROR. In this case, the error log can contain the following errors:

ErrorID Description
EPL_ERR_GENERAL An unexpected exception error has occurred.
EPL_ERR_TRANS_NO_SELECTED_OBJECTS No objects were indicated that are to be translated.

Example

void startOfflineTranslation(EplSession hSession)
{
       
       EplHandle hPrjIter = eplOpenIterator(hSession, -1, EPL_ITERTYPE_PROJECTS);
       if(hPrjIter != EPL_ERROR)
       {
               EplHandle hCmd = eplCreateCommand(hSession,
                                                 L"EPLAN.EPLAN21.TRANSLATE.OFFLINE");
               eplSetHandleParam(hSession,
                                 hCmd,
                                 EPL_PARAM_TRANSLATE_OFFLINE_SELECTION,
                                 hPrjIter,
                                 0);
               eplExecuteCommand(hSession, hCmd);
               eplCloseObject(hSession, hCmd);
               eplCloseObject(hSession, hPrjIter);
       }
       
}

Reference