Share via


lang Function (Windows CE 5.0)

Send Feedback

Returns True if the xml:lang attribute of the context node is the same as a sublanguage of the language specified by the argument string.

booleanlang(string)

Parameters

  • string
    A string specifying a language.

Return Values

Returns True if the xml:lang attribute of the context node is the same as a sublanguage of the language specified by the argument string.

Remarks

The language of the context node is determined by the value of the xml:lang attribute on the context node, or if the context node has no xml:lang attribute, by the value of the xml:lang attribute on the nearest ancestor of the context node that has an xml:lang attribute. If there is no such attribute, lang() returns False. If there is such an attribute, lang() returns True if the attribute value is equal to the argument (ignoring case) or if there is a suffix starting with "-", such that the attribute value is equal to the argument, ignoring the suffix of the attribute value and ignoring case.

Given the following XML elements:

<para xml:lang="en"/>
<div xml:lang="en"><para/></div>
<para xml:lang="EN"/>
<para xml:lang="en-us"/>

The following function call returns True for all.

lang("en")

Requirements

None.

See Also

Boolean Functions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.