EPLAN.EPLAN21.DESTINATION_LANGUAGE

Contents

Description

Command for setting and/or querying the languages to be translated.

Parameters

ParameterID Type Description
EPL_PARAM_DESTINATION_LANGUAGES [IN/OUT, OPTIONAL]
String
This parameter contains the languages, that are to be set or queried, in the form of a string. The languages are specified by the country code. If the parameter contains more than one language, the codes will be entered directly one after the other without a separator.

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_INVALID_ARGUMENT The languages contained in the DESTINATION_LANGUAGES parameter do not contain the current default language.

Example

The following simple example shows two functions that set the languages to be translated to German and English and determine and return the current selection.

void setDestinationLanguages(EplSession hSession)
{
       EplHandle hCmd = eplCreateCommand(hSession,
                                        L"EPLAN.EPLAN21.DESTINATION_LANGUAGE");

       eplSetParam(hSession,
                   hCmd,
                   EPL_PARAM_DESTINATION_LANGUAGES,
                   L"DEEN",
                   0);
       eplExecuteCommand(hSession, hCmd);
       eplCloseObject(hSession, hCmd);
       eplDestroySession(hSession);
}

void getDestinationLanguages(EplChar* buf, size_t bufsize)
{
       assert(bufsize >= 2);
       EplSession hSession = eplCreateSession();
       EplHandle hCmd = eplCreateCommand(hSession,
                                        L"EPLAN.EPLAN21.DESTINATION_LANGUAGE");
       if(eplExecuteCommand(hSession, hCmd) != EPL_ERROR)
       {
              eplGetParam(hSession,
                          hCmd,
                          EPL_PARAM_DESTINATION_LANGUAGES,
                          0,
                          buf,
                          bufsize);
       } else
               buf[0] = L'\0';
       eplCloseObject(hSession, hCmd);
}

Reference