MLCDocumentsGetDocumentFromLanguage Method (ConnectionId, SessionId, DocumentId, String, Int32) Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Returns id of the document and its category that represents a certain language version of a document.

Namespace: ContentStudio.Document.MLC
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public string GetDocumentFromLanguage(
	ConnectionId connectionId,
	SessionId sessionId,
	DocumentId documentId,
	string languageCode,
	int languageId
)

Parameters

connectionId
Type: ContentStudioConnectionId
A value that identifies the web site
sessionId
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId).
documentId
Type: ContentStudio.DocumentDocumentId
The original document to get a localized version for.
languageCode
Type: SystemString
A language code short string. Pass null or an empty string to use the languageId parameter instead.
languageId
Type: SystemInt32
The identifier of the language to use. This parameter is ignored unless languageCode is null or empty.

Return Value

Type: String
Xml
Xml
<root>
  <status>0</status>
  <statustext>Success</statustext>
  <doc documentid="NN" categoryid="NN" />
</root>
Exceptions

ExceptionCondition
CSPermissionDeniedException
CSInvalidSessionException
CSInvalidParameterException
CSDocumentNotFoundException
CSExceptionA business rule was violated in the underlying Content Studio database
  • 1001 - The SessionID is invalid.
  • 1002 - Permission denied.
  • 1009 - Invalid parameter value.
  • 1100 - The document does not exist.
  • 1558 - The document is not an MLC member document.
  • 1561 - The language does not exists in the specified MLC.
  • 1838 - The document is not published.
SqlExceptionAn error occurred when executing the command against the Content Studio database
Content Studio permissions

Browse permission is required on the document and anonymous callers are supported.
Remarks

The desired language can be supplied either as the language code e.g. "sv-fi" (Swedish-Finland) or as its language id e.g. 2077 (Swedish-Finland). To use the language id the languageCode must be empty or null and a valid language id must be supplied in the languageId parameter.

For more information about language codes in Content Studio see MLC language codes and identifiers

See Also

Reference