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
ESB_FUNC_M EsbOtlSetAliasTableLanguage (hOutline, pszAliasTable, pszLanguageCode) ByVal hOutline As Long ByVal pszAliasTable As String ByVal pszLanguageCode As String
Parameter | Description |
---|---|
hOutline | Outline context handle. |
pszAliasTable | Name of the alias table for which to set a language code. |
pszLanguageCode | 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
Declare Function EsbOtlGetAliasTableLanguages Lib "esbotln" (ByVal hOutline As Long, ByVal pszAliasTable As String, pulCount As Long) As Long Declare Function EsbOtlSetAliasTableLanguage Lib "esbotln" (ByVal hOutline As Long, ByVal pszAliasTable As String, ByVal pszLanguageCode As String) As Long Declare Function EsbOtlClearAliasTableLanguages Lib "esbotln" (ByVal hOutline As Long, ByVal pszAliasTable As String) As Long Sub ESB_Sub () Dim sts As Long Dim Object As ESB_OBJDEF_T Dim hOutline As Long Dim Items As Long Dim AliasLang As String * ESB_ALIASNAMELEN Object.hCtx = hCtx Object.Type = ESB_OBJTYPE_OUTLINE Object.AppName = "Sample" Object.DbName = "Basic" Object.FileName = "Basic" sts = EsbOtlOpenOutline(hCtx, Object, ESB_YES, ESB_YES, hOutline) If sts = 0 Then sts = EsbOtlCreateAliasTable(hOutline, "French Alias Table") End If If sts = 0 Then sts = EsbOtlSetAliasTableLanguage(hOutline, "French Alias Table", "fr") End If If sts = 0 Then sts = EsbOtlSetAliasTableLanguage(hOutline, "French Alias Table", "fr-CA") End If If sts = 0 Then sts = EsbOtlGetAliasTableLanguages(hOutline, "French Alias Table", Items) If sts = 0 Then For N = 1 To Items sts = EsbGetNextItem(hCtx, ESB_ALIASLANG_TYPE, ByVal AliasLang) Next End If End If If sts = 0 Then sts = EsbOtlClearAliasTableLanguages(hOutline, "French Alias Table") End If End Sub
See Also