i18n sorting for countries
Currently, in order to sort the countries in the MappedCountry list, something like the following has to be done:
The collator part is important here, otherwise the output is still wrong. (Depending on the locale o=ö, o<ö or o<z<ö.)
It would be a good idea to add this maybe to the country fields (and other i18n fields) or at least to add a Helper function for locale based string sorting.
object birthplace_country extends MappedCountry(this) {
val collator = java.text.Collator.getInstance() // might/should receive the lift locale
override def buildDisplayList: List[(Int, String)] = (
super.buildDisplayList.sortWith((s1, s2) => collator.compare(s1._2, s2._2) < 0)
)
// override def defaultValue is probably not solvable on a global scale, or is it?
}
The collator part is important here, otherwise the output is still wrong. (Depending on the locale o=ö, o<ö or o<z<ö.)
It would be a good idea to add this maybe to the country fields (and other i18n fields) or at least to add a Helper function for locale based string sorting.
Leave a comment
(In revision:9db0024dd99e62e4ff71dedde3beca7c1034cb4f) Closes #621. Sort the country display list
Branch: master
Branch: master