Project

Profile

Help

Sorting in languages such as Polish, ...

Added by Anonymous over 15 years ago

Legacy ID: #7126245 Legacy Poster: gertone (gertone)

Hi, I need to sort using XSLT2 and Saxon, various languages such as Polish,... (full list below) I tested a couple of them and it seems to work well, simply using <xsl:sort select="." lang="pl"/> <xsl:sort select="." lang="el"/> There are no special requirements for the sort, simply as it is done in the dictionanary The languages are Czech, Danish, German, Greek, English, Spanish, Estonian, Finnish, French, Hungarian, Italian, Letvian, Litovanian, Dutch, Ploish, Portoguese, Swedish, Slovakian, Slovenian, Roumanian, Bulgarian and Croatian... yep, each and every official European language. Can I rely on the sort being correct for all of these languages, simply using the lang attribute with the two letter ISO 639-1 code? Or should I use collations instead. If yes, for which languages would I need collations, and if so, are they somewhere available, or do I have to develop them myself? Thanks for an answer Geert


Replies (2)

RE: Sorting in languages such as Polish, ... - Added by Anonymous over 15 years ago

Legacy ID: #7131108 Legacy Poster: Michael Kay (mhkay)

If you provide a language code and nothing else, Saxon will ask the Java VM for a Locale for the given language, and then use the collation associated with the Locale. So the set of languages supported depends entirely on the Java VM. The static method Locale.getAvailableLocales() returns a list of the Locales supported by your particular JVM.

RE: Sorting in languages such as Polish, ... - Added by Anonymous over 15 years ago

Legacy ID: #7131161 Legacy Poster: gertone (gertone)

Thanks Michael, that makes sense

    (1-2/2)

    Please register to reply