Returns an array of language codes, and the number of language codes in the array, that are associated with the specified alias table.
Syntax
ESS_FUNC_M EssOtlGetAliasTableLanguages (hOutline, pszAliasTable, pulCount, ppLangArray);
| Parameter | Data Type | Description |
|---|---|---|
hOutline | ESS_HOUTLINE_T | Handle to the outline. |
pszAliasTable | ESS_STR_T | Name of the alias table for which to get the associated language codes. |
pulCount | ESS_PULONG_T | Address of a variable in which to return the number of language codes associated with the alias table. |
ppLangArray | ESS_PPALIASLANG_T | An array of the language codes associated with the alias table specified in pszAliasTable. The memory allocated for ppLangArray should be freed using EssFree(). |
Return Value
If successful, returns 0.
If unsuccessful, returns the error OTLAPI_BAD_ALIASTABLE (invalid alias table).
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