Suppose I have list of words like
a, b, c, ą, ć, z, ż
I want to be sorted with polish locale like:
a, ą, b, c, ć, z, ż
Is it possible to achieve?
UPDATE:
Suppose I have to sort list by two object parameters and also using collator. For one property I can use:
val collator = Collator.getInstance(context.getResources().getConfiguration().locale)
myList.sortedWith(compareBy(collator, { it.lastName.toLowerCase() }))
How to add to this also to sort by firstName
? (so for example if there will be two same lastName
then sort them by firstName
)