Partager via


IXpsOMPage::SetLanguage method

Sets the Language property of the page.

Syntax

HRESULT SetLanguage(
  [in] LPCWSTR language
);

Parameters

  • language [in]
    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

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Header

Xpsobjectmodel.h

IDL

XpsObjectModel.idl

See also

IXpsOMPage

The Internet Engineering Task Force (IETF) RFC 3066

XPS Document Errors

XML Paper Specification