IXpsOMPage::SetLanguage method (xpsobjectmodel.h)

Sets the Language property of the page.

Syntax

HRESULT SetLanguage(
  [in] LPCWSTR language
);

Parameters

[in] language

A language tag string that represents the language of the page content. A NULL pointer clears the previously assigned language.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the table that follows. For information about XPS document API return values that are not listed in this table, see XPS Document Errors.

Return code Description
S_OK
The method succeeded.
XPS_E_INVALID_LANGUAGE
The language string contains one or more language strings that are not valid.

Remarks

The language tag string must conform to the language tag syntax that is described in the Internet Engineering Task Force (IETF) RFC 3066. For more information, go to http://tools.ietf.org/html/rfc3066.

Requirements

Requirement Value
Minimum supported client Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header xpsobjectmodel.h

See also

IXpsOMPage

The Internet Engineering Task Force (IETF) RFC 3066

XML Paper Specification

XPS Document Errors