Skip to content

Instantly share code, notes, and snippets.

@joewiz
Last active January 17, 2017 17:04
Show Gist options
  • Save joewiz/f5324ecad72d921bd632d08d124e8bc0 to your computer and use it in GitHub Desktop.
Save joewiz/f5324ecad72d921bd632d08d124e8bc0 to your computer and use it in GitHub Desktop.
List collation locales (for sorting strings using language-specific rules) available in eXist
xquery version "3.1";
(: List all collation locales available for use in the '?lang=' parameter of a collation URI.
: @see http://exist-db.org/exist/apps/doc/xquery.xml#collations
: @see http://exist-db.org/exist/apps/fundocs/view.html?uri=http://exist-db.org/xquery/util#collations.0
:)
element collations {
for $collation in util:collations()
order by $collation
return
element collation { $collation }
}
<collations>
<collation/>
<collation>ar</collation>
<collation>ar-AE</collation>
<collation>ar-BH</collation>
<collation>ar-DZ</collation>
<collation>ar-EG</collation>
<collation>ar-IQ</collation>
<collation>ar-JO</collation>
<collation>ar-KW</collation>
<collation>ar-LB</collation>
<collation>ar-LY</collation>
<collation>ar-MA</collation>
<collation>ar-OM</collation>
<collation>ar-QA</collation>
<collation>ar-SA</collation>
<collation>ar-SD</collation>
<collation>ar-SY</collation>
<collation>ar-TN</collation>
<collation>ar-YE</collation>
<collation>be</collation>
<collation>be-BY</collation>
<collation>bg</collation>
<collation>bg-BG</collation>
<collation>ca</collation>
<collation>ca-ES</collation>
<collation>cs</collation>
<collation>cs-CZ</collation>
<collation>da</collation>
<collation>da-DK</collation>
<collation>de</collation>
<collation>de-AT</collation>
<collation>de-CH</collation>
<collation>de-DE</collation>
<collation>de-GR</collation>
<collation>de-LU</collation>
<collation>el</collation>
<collation>el-CY</collation>
<collation>el-GR</collation>
<collation>en</collation>
<collation>en-AU</collation>
<collation>en-CA</collation>
<collation>en-GB</collation>
<collation>en-IE</collation>
<collation>en-IN</collation>
<collation>en-MT</collation>
<collation>en-NZ</collation>
<collation>en-PH</collation>
<collation>en-SG</collation>
<collation>en-US</collation>
<collation>en-ZA</collation>
<collation>es</collation>
<collation>es-AR</collation>
<collation>es-BO</collation>
<collation>es-CL</collation>
<collation>es-CO</collation>
<collation>es-CR</collation>
<collation>es-CU</collation>
<collation>es-DO</collation>
<collation>es-EC</collation>
<collation>es-ES</collation>
<collation>es-GT</collation>
<collation>es-HN</collation>
<collation>es-MX</collation>
<collation>es-NI</collation>
<collation>es-PA</collation>
<collation>es-PE</collation>
<collation>es-PR</collation>
<collation>es-PY</collation>
<collation>es-SV</collation>
<collation>es-US</collation>
<collation>es-UY</collation>
<collation>es-VE</collation>
<collation>et</collation>
<collation>et-EE</collation>
<collation>fi</collation>
<collation>fi-FI</collation>
<collation>fr</collation>
<collation>fr-BE</collation>
<collation>fr-CA</collation>
<collation>fr-CH</collation>
<collation>fr-FR</collation>
<collation>fr-LU</collation>
<collation>ga</collation>
<collation>ga-IE</collation>
<collation>hi</collation>
<collation>hi-IN</collation>
<collation>hr</collation>
<collation>hr-HR</collation>
<collation>hu</collation>
<collation>hu-HU</collation>
<collation>in</collation>
<collation>in-ID</collation>
<collation>is</collation>
<collation>is-IS</collation>
<collation>it</collation>
<collation>it-CH</collation>
<collation>it-IT</collation>
<collation>iw</collation>
<collation>iw-IL</collation>
<collation>ja</collation>
<collation>ja-JP</collation>
<collation>ja-JP</collation>
<collation>ko</collation>
<collation>ko-KR</collation>
<collation>lt</collation>
<collation>lt-LT</collation>
<collation>lv</collation>
<collation>lv-LV</collation>
<collation>mk</collation>
<collation>mk-MK</collation>
<collation>ms</collation>
<collation>ms-MY</collation>
<collation>mt</collation>
<collation>mt-MT</collation>
<collation>nl</collation>
<collation>nl-BE</collation>
<collation>nl-NL</collation>
<collation>no</collation>
<collation>no-NO</collation>
<collation>no-NO</collation>
<collation>pl</collation>
<collation>pl-PL</collation>
<collation>pt</collation>
<collation>pt-BR</collation>
<collation>pt-PT</collation>
<collation>ro</collation>
<collation>ro-RO</collation>
<collation>ru</collation>
<collation>ru-RU</collation>
<collation>sk</collation>
<collation>sk-SK</collation>
<collation>sl</collation>
<collation>sl-SI</collation>
<collation>sq</collation>
<collation>sq-AL</collation>
<collation>sr</collation>
<collation>sr</collation>
<collation>sr-BA</collation>
<collation>sr-BA</collation>
<collation>sr-CS</collation>
<collation>sr-ME</collation>
<collation>sr-ME</collation>
<collation>sr-RS</collation>
<collation>sr-RS</collation>
<collation>sv</collation>
<collation>sv-SE</collation>
<collation>th</collation>
<collation>th-TH</collation>
<collation>th-TH</collation>
<collation>tr</collation>
<collation>tr-TR</collation>
<collation>uk</collation>
<collation>uk-UA</collation>
<collation>vi</collation>
<collation>vi-VN</collation>
<collation>zh</collation>
<collation>zh-CN</collation>
<collation>zh-HK</collation>
<collation>zh-SG</collation>
<collation>zh-TW</collation>
</collations>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment