EssOtlSetAliasTableLanguage

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);
ParameterData TypeDescription

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

Return Value

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