Returns the number of the number of language codes associated with the specified alias table, and generates a list of alias table strings accessible through EsbGetNextItem().
Syntax
ESB_FUNC_M EsbOtlGetAliasTableLanguages (hOutline, pszAliasTable, pItems) ByVal hOutline As Long ByVal pszAliasTable As String pItems As Long
Parameter | Description |
---|---|
hOutline | Handle to the outline. |
pszAliasTable | Name of the alias table for which to get an associated language code. |
pItems | Address of a variable in which to return the number of language codes associated with the alias table. |
Return Value
If successful, returns the number of alias table languages in pItems, and generates a list of alias table strings accessible through EsbGetNextItem().
If unsuccessful, returns the error OTLAPI_BAD_ALIASTABLE (invalid alias table).
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