lang( )
boolean
lang(string languageCode
)
The lang( )
function returns true if the context node is
written in the language specified by the languageCode
argument; otherwise, it is
false. The nearest xml:lang
attribute on the context node or one of its ancestors determines
the language of any given node. If no such xml:lang
attribute exists, then lang( )
returns false.
The lang( )
function
takes into account country and other subcodes before making its
determination. For example, lang('fr')
returns true for elements
whose language code is fr-FR
,
fr-CA
, or fr
. However, lang('fr-FR')
is not true for elements
whose language code is fr-CA
or
fr
.