Command for setting and/or querying the displayed languages.
ParameterID | Type | Description |
---|---|---|
EPL_PARAM_DISPLAY_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. |
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 specified in the DISPLAY_LANGUAGES parameter are not included in the target languages. It is only possible to display languages, into which a translation is made. The display languages were not changed. |
The following simple example shows two functions that set the displayed languages to German and English and determine and return the current selection.
void setDisplayLanguages(EplSession hSession) { EplHandle hCmd = eplCreateCommand(hSession, L"EPLAN.EPLAN21.DISPLAY_LANGUAGE"); // Have the German and the English text displayed: eplSetParam(hSession, hCmd, EPL_PARAM_DISPLAY_LANGUAGES, L"DEEN", 0); eplExecuteCommand(hSession, hCmd); eplCloseObject(hSession, hCmd); eplDestroySession(hSession); } void getDisplayLanguages(EplChar* buf, size_t bufsize) { assert(bufsize >= 2); EplSession hSession = eplCreateSession(); EplHandle hCmd = eplCreateCommand(hSession, L"EPLAN.EPLAN21.DISPLAY_LANGUAGE"); if(eplExecuteCommand(hSession, hCmd) != EPL_ERROR) { eplGetParam(hSession, hCmd, EPL_PARAM_DISPLAY_LANGUAGES, 0, buf, bufsize); } else buf[0] = L'\0'; eplCloseObject(hSession, hCmd); } |