Sets a language code for the specified alias table.
By setting alias table language codes, when an application running in an ApplCore session accesses an Essbase database, the correct alias table is automatically selected on application selection.
Syntax
ESS_FUNC_M EssOtlSetAliasTableLanguage (hOutline, pszAliasTable, pszLanguageCode);
Parameter | Data Type | Description |
---|---|---|
hOutline | ESS_HOUTLINE_T | Outline context handle. |
pszAliasTable | ESS_STR_T | Name of the alias table for which to set a language code. |
pszLanguageCode | ESS_STR_T | A language code to assign to the alias table specified in pszAliasTable. The language code should be a middle-tier language tag from an ApplCore session. Language codes are not case-sensitive. |
Notes
You cannot set a language code on the default alias table.
Any number of language codes can be assigned to an alias table. To set multiple language codes, call this function for each language code.
Setting a new language code does not override language codes currently assigned to the alias table.
The same language code must not be assigned to another alias table within the same database.
Return Value
If successful, returns 0.
If unsuccessful, returns one of the following errors:
OTLAPI_BAD_ALIASTABLE (invalid alias table)
OTLAPI_ERR_DUP_LANGCODE (the language code is assigned to another alias table within the same database)
Access
This function does not require special privileges.
Example
#include <essapi.h> #include <essotl.h> ESS_STS_T sts = 0; ESS_OUTLINEINFO_T NewInfo; ESS_HOUTLINE_T hOutline; ESS_PALIASLANG_T pLangs=ESS_NULL; ESS_ULONG_T nLangs = 0, i=0; memset(&NewInfo, '\0', sizeof(NewInfo)); sts = EssOtlNewOutline(hCtx, &NewInfo, &hOutline); if (!sts) { sts = EssOtlCreateAliasTable(hOutline, "French Alias Table"); } if (!sts) { sts = EssOtlSetAliasTableLanguage (hOutline, "French Alias Table", "fr"); } if (!sts) { sts = EssOtlSetAliasTableLanguage (hOutline, "French Alias Table", "fr-CA"); } if (!sts) { sts = EssOtlGetAliasTableLanguages(hOutline, "French Alias Table", &nLangs, &pLangs); if ( !sts == ESS_STS_NOERR && ( pLangs) ) { for (i=0;i<nLangs ;++i) { if (pLangs[i]) { printf("Language Code: %s\n", pLangs[i]); } } EssFree(hInst, pLangs); } } if (!sts) { sts = EssOtlClearAliasTableLanguages (hOutline, "French Alias Table"); }
See Also