This API will allow a developer to get/set language information for Content Server.


Class Attributes Index

 o ERROR
Unknown error constant .
 o BAD_TABLE_FORMAT
The pMultilingual table attribute is not in the expected format.
 o DISABLED
The language is disabled.
 o INVALID
The language is invalid.
 o EMPTY
The language name cannot be empty.
 o EMPTY_VALUE
The value cannot be empty.
 o EMPTY_LOCAL
The local language name cannot be empty.
 o INVALID_ASSOC
The name/language assoc is invalid.
 o OK
Success return constant.

Class Methods Index

 o GetSystemLanguages( CAPICONNECT connection )
Gets the master list of languages defined in Content Server.
 o GetDefaultLanguage( CAPILOGIN login )
Gets the default metadata language code.
 o SetDefaultLanguage( CAPILOGIN login, String languageCode )
Sets the default metadata language code.
 o GetEnabledLanguages( CAPICONNECT connection )
Gets the list of enabled metadata languages.
 o InsertLanguage( CAPILOGIN login, String languageCode, [Boolean enabled] )
Adds a language to the pool of available metadata languages.
 o DeleteLanguage( CAPILOGIN login, String languageCode )
Removes a language from the pool of available metadata languages.
 o RenameLanguage( CAPICONNECT connection, String languageCode, String languageName, String languageNameLocal )
Update the display labels for the given metadata language code.
 o EnableLanguage( CAPILOGIN login, String languageCode )
Mark the given metadata language as enabled.
 o DisableLanguage( CAPILOGIN login, String languageCode )
Mark the given metadata language as disabled.
 o IsLanguageEnabled( CAPICONNECT connection, String languageCode )
Checks if the given language code is currently enabled.
 o DetermineCoreValue( CAPILOGIN login, Assoc values )
Determine the core value (based on current language configuration) from the data given.
 o DetermineCoreLanguageCode( CAPILOGIN login, Assoc values )
Determine the language code for the core value (based on current language configuration) from the data given.

Class Attributes

 o ERROR
 Error ERROR

Unknown error constant.

 o BAD_TABLE_FORMAT
 Error BAD_TABLE_FORMAT

The pMultilingual table attribute is not in the expected format.

 o DISABLED
 Error DISABLED

The language is disabled.

 o INVALID
 Error INVALID

The language is invalid.

 o EMPTY
 Error EMPTY

The language name cannot be empty.

 o EMPTY_VALUE
 Error EMPTY_VALUE

The value cannot be empty.

 o EMPTY_LOCAL
 Error EMPTY_LOCAL

The local language name cannot be empty.

 o INVALID_ASSOC
 Error INVALID_ASSOC

The name/language assoc is invalid.

 o OK
 Integer OK

Success return constant.

Class Methods

 o GetSystemLanguages
 RecArray GetSystemLanguages(
            CAPICONNECT connection )

Gets the master list of languages defined in Content Server. .

Parameters:
connection  -  The connection to use for the query.
Returns:
A RecArray containing the languages if successful. If the function fails,
an error code will be returned. The format of the RecArray is as follows:

LanguageCode the language code in the format xx_YYY (for example: en, en_US)
LanguageName the name of the language that the admin user will see
LanguageNameLocal the localized name of the language that non-admin users will see
 o GetDefaultLanguage
 String GetDefaultLanguage(
            CAPILOGIN login )

Gets the default metadata language code.

Parameters:
login  -  The login to use to fetch the data.
Returns:
A String representing the default language code; Error otherwise.

 o SetDefaultLanguage
 Integer SetDefaultLanguage(
            CAPILOGIN login )
            String languageCode )

Sets the default metadata language code.

Parameters:
login  -  The login to use to set the data.
languageCode  -  The language code to make default.
Returns:
Language.OK (Integer zero) if successful; Error otherwise.

 o GetEnabledLanguages
 RecArray GetEnabledLanguages(
        CAPICONNECT connection )

Gets the list of enabled metadata languages.

Parameters:
connection  -  The connection to use for the query.
Returns:
A RecArray containing the languages if successful; Error otherwise.
The format for the RecArray is as follows:
LanguageCode the language code in the format xx_YYY (for example: en, en_US)
LanguageName the name of the language that the admin user will see
LanguageNameLocal the localized name of the language that non-admin users will see
 o InsertLanguage
 Integer InsertLanguage(
            CAPILOGIN login )
            String languageCode )
            Boolean enabled )

Adds a language to the pool of available metadata languages.

Parameters:
login  -  The login to use to set the data.
languageCode  -  The language code to add.
enabled  -  Optional: true if the language should be enabled (default is false).
Returns:
Language.OK (Integer zero) if successful; Error otherwise.

 o DeleteLanguage
 Integer DeleteLanguage(
            CAPILOGIN login )
            String languageCode )

Removes a language from the pool of available metadata languages.

Parameters:
login  -  The login to use to set the data.
languageCode  -  The language code to remove.
Returns:
Language.OK (Integer zero) if successful; Error otherwise.

 o RenameLanguage
 Integer RenameLanguage(
            CAPICONNECT connect )
            String languageCode )
            String languageName )
            String languageNameLocal )

Adds a language to the pool of available metadata languages.

Parameters:
connect  -  The connection to use to set the data.
languageCode  -  The language code to add.
languageName  -  The new name of the language for the admin user's view.
languageNameLocal  -  The new name of the language for the localized, non-admin user's view.
returns:
language.ok (integer zero) if successful; error otherwise.

 o EnableLanguage
 Integer EnableLanguage(
            CAPILOGIN login )
            String languageCode )

Mark the given metadata language as enabled.

Parameters:
login  -  The login to use to set the data.
languageCode  -  The language code to enable.
Returns:
Language.OK (Integer zero) if successful; Error otherwise.

 o DisableLanguage
 Integer DisableLanguage(
            CAPILOGIN login )
            String languageCode )

Mark the given metadata language as disabled.

Parameters:
login  -  The login to use to set the data.
languageCode  -  The language code to disable.
Returns:
Language.OK (Integer zero) if successful; Error otherwise.

 o IsLanguageEnabled
 Boolean IsLanguageEnabled(
            CAPICONNECT connection )
            String languageCode )

Checks if the given metadata language is currently enabled.

Parameters:
connection  -  The connection to use to retrieve the data.
languageCode  -  The language code to check.
Returns:
True if the given language is currently enabled; false if not.

 o DetermineCoreValue
 String DetermineCoreValue(
            CAPILOGIN login )
            Assoc values )

Determine the core value from the data given, based on the current language configuration.

Parameters:
login  -  The login to use to retrieve the data.
values  -  A set of values, keyed by their respective language codes.
Returns:
The core value as a string if successful; Error otherwise.

 o DetermineCoreLanguageCode
 String DetermineCoreLanguageCode(
            CAPILOGIN login )
            Assoc values )

Determine the language code for the core value from the data given, based on the current language configuration.

Parameters:
login  -  The login to use to retrieve the data.
values  -  A set of values, keyed by their respective language codes.
Returns:
The core language code as a string if successful; Error otherwise.