<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/sem.langMatches.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>sem.langMatches</api:function-name><api:suggest>sem.langmatches</api:suggest><api:suggest>sem</api:suggest><api:suggest>langmatches</api:suggest><api:function-link mode="xquery" fullname="sem:langMatches">/apidoc/8.0/sem:langMatches.xml</api:function-link><api:function mode="javascript" name="langMatches" type="builtin" lib="sem" category="Semantics" hidden="false" bucket="MarkLogic Built-In Functions" prefix="sem" namespace="http://marklogic.com/semantics" fullname="sem.langMatches"><api:summary>
  Returns true if <code xmlns="http://www.w3.org/1999/xhtml">$lang-tag</code> matches <code xmlns="http://www.w3.org/1999/xhtml">$lang-range</code> 
  according to the basic filtering scheme defined in RFC4647.
  This XQuery function backs up the SPARQL langMatches() function.
  <p xmlns="http://www.w3.org/1999/xhtml">This function is a built-in.</p>
</api:summary><api:params><api:param name="lang-tag" type="xs:string"><api:param-description>
    The language tag.
  </api:param-description><api:param-name>lang-tag</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="lang-range" type="xs:string"><api:param-description>
    The language range.
  </api:param-description><api:param-name>lang-range</api:param-name><api:param-type>String</api:param-type></api:param></api:params><api:return>Boolean</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
var triple = sem.triple(sem.iri("subject"), sem.iri("predicate"), "object");
sem.langMatches(sem.tripleSubject(triple), "fr");
=&gt;
false
</pre></api:example></api:function></api:function-page>