The lang function tests whether the language specified by the language argument matches the language of the context node (which is normally assigned by the xsl:lang element). If yes, true is returned. If no, or if no language is assigned to the context node, false is returned.