I18n collation - use different sort order for different languages/locales

DiscussieRecommend Site Improvements

Sluit je aan bij LibraryThing om te posten.

I18n collation - use different sort order for different languages/locales

1drbjork
jan 15, 2022, 6:26 am

I'm a bit perplexed that LibraryThing hasn't implemented locale dependent collation (sort) order. I've found a couple of discussions on this on the forum, but they're almost 10 years old. Everything is sorted according to the English language, even on the language specific sites.

Since there are standard libraries to handle this, why not add a collation setting for each library?

As a Swedish user, it's annoying to have every Å, Ä and Ö sorted alongside A and O. Same goes for many other languages.

2AnnieMod
jan 15, 2022, 7:23 am

So what language rules should be used for someone who has books in multiple languages? :) That’s at least part of the problem with trying to sort based on one’s library - not all libraries are monolingual. You have a similar problem if you use the language of the site you are on as well - multilingual libraries - using English or Swedish sorting does not make a difference if you have books in languages which need the same letters to sort differently depending on which language the book is in.

3drbjork
Bewerkt: jan 15, 2022, 10:00 am

>2 AnnieMod: This argument is often put forward, but sorting books in a physical library does not depend on the language of the book, but the language of the library or the language/sort order of the collection in question. I have all fiction sorted by the Swedish alphabet, no matter the language of the book. That makes sense to me as a Swedish language user. A person speaking English would probably sort their books according to English sorting rules, including Swedish authors.

Being able to customise sort order for every sort order has nothing to do with the language of the book.

4AnnieMod
jan 15, 2022, 1:25 pm

>3 drbjork: I speak multiple languages and own books in multiple languages. And my physical books are sorted based on their own language rules - not based on one of my languages. :) And that’s probably true for most people whose libraries cross languages.

5drbjork
jan 15, 2022, 2:01 pm

>4 AnnieMod: Then a collation setting for each collection would be a good idea for your LibraryThing as well… 😉

6MarthaJeanne
jan 15, 2022, 2:06 pm

My collections are multilingual.

7drbjork
jan 15, 2022, 2:16 pm

I can't be the only one asking for different sort orders i different collections, can I? From a developer's point of view, this isn't hard to implement, so I can't see why not. You can just leave it in the default English sort order if you don't want to use the feature.

8MarthaJeanne
jan 15, 2022, 2:26 pm

But that's not what you started out asking for. You started out asking to have sorting orders changed for people without them getting a say, based on criteria that don't actually match how other people use LT.

9AnnieMod
jan 15, 2022, 2:31 pm

>5 drbjork: Your request in >1 drbjork: is for a locale based rules, not the ability for someone to specify what rules to be used in each of their collections. I am explaining why this is a very bad idea.

Collection based has its own problems in multi language libraries - you don’t always look at a single collection. How do you propose LT to determine what to use if you look at ALL collections (filtered by tag or a search term)?

10bnielsen
jan 16, 2022, 12:49 pm

I don't use the sort order for anything exciting. Mostly I search in my library and expect to get max 10 or 20 entries in some semi-intelligent order.
If I need to sort in any advanced way I use the export file and roll my own.
I.e. All Agatha Christie titles in series order.

Just adding my $0.05.

11drbjork
jan 17, 2022, 9:08 am

>8 MarthaJeanne: >9 AnnieMod:

Obviously I haven't made myself clear. English isn't my native language so please forgive any misunderstandings I may have caused.

I'm asking for the possibility of sorting your libraries/collections based on language specific sort orders. I want this to be a setting of the library/collection in question. For example, a collection "Swedish books" could be sorted according to Swedish rules, and another collection "English books" sorted according to English sorting rules.

I may have applied the words "locale specific" and "collation" incorrectly. I have never meant that LibraryThing should guess the sort order based on the language of books or the language of the browser. I want it to be sorted according to a locale of your choice.

I tried to change the title of the discussion thread, but that seems impossible. Or it's just another thing where I lack knowledge.

12MarthaJeanne
jan 17, 2022, 9:19 am

You can only change the subject for about 10 minutes.

13jjwilson61
jan 17, 2022, 3:29 pm

I think it's reasonable to allow a user to specify a language specific sort order for their own library. It wouldn't apply to results of site wide searches though

14Keeline
jan 17, 2022, 3:30 pm

As a programmer I don't do a lot with it but I do recall that there are database table settings for MySQL that let you set a "collation" or sort order. The trouble with this on usage in LT is that it is not something you can do on a per-query basis. You set an entire table with it.

OK. I do see where it is possible to define a collation on a query with MySQL but this is done at a significant performance penalty. Aside from the complexity, that is probably a big reason why it is not done.

James