Newer Version Available

This content describes an older version of this product. View Latest

describeKnowledge()Call Name

Retrieves the Knowledge language settings in the organization.

Syntax

1KnowledgeSettings result = _connection.describeKnowledgeSettings();

Usage

Use this call to describe the existing Knowledge language settings, including the default Knowledge language, supported languages, and a list of Knowledge language information. You can also use KnowledgeSettings in the Metadata API to obtain similar information.

Sample Code—Java

This sample shows how to retrieve the Knowledge language settings. It returns the default Knowledge language, a list of Knowledge supported language, including the language code and whether is an active Knowledge language.

1public void describeKnowledgeSettingsSampl e() {
2try {
3
4// Make the describe call for KnowledgeSettings
5KnowledgeSettings result = connection.describeKnowledgeSettings();
6
7// Get the properties of KnowledgeSettings
8System.out.println("Knowledge default language: " + result.getDefaultLanguage());
9for (KnowledgeLanguageItem lang : result.getLanguages()) {
10System.out.println("Language: " + lang.getName());
11System.out.println("Active: " + lang.isActive());
12}
13} catch (ConnectionException ex) {
14ex.printStackTrace();
15}
16}

Sample Code—C#

This sample shows how to retrieve the Knowledge language settings. It returns the default Knowledge language, a list of Knowledge supported language, including the language code and whether is an active Knowledge language.

1public void describeKnowledgeSettingsSampl e() {
2try {
3
4// Make the describe call for KnowledgeSettings
5KnowledgeSettings result = connection.describeKnowledgeSettings();
6
7// Get the properties of KnowledgeSettings
8Console.WriteLine("Knowledge default language: " + result.getDefaultLanguage());
9for (KnowledgeLanguageItem lang : result.getLanguages()) {
10Console.WriteLine("Language: " + lang.getName());
11Console.WriteLine("Active: " + lang.isActive());
12}
13} catch (SoapException ex) {
14ex.printStackTrace();
15}
16}

Response

KnowledgeSettings