-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve collation #266
Comments
The place to fix it: https://github.com/Tatoeba/tatoeba2/blob/master/app/views/helpers/languages.php#L240 This is the line that does the sort:
Maybe this will give the solution to sort properly: http://stackoverflow.com/questions/2897924/sort-array-with-special-characters-in-php |
Some notes after looking at those pages: (1) One person wrote: "I ended up installing the French language pack to my server and using the following : setlocale(LC_COLLATE, 'fr_CA.utf8'); which worked. (2) The syntax here is a bit different, but it may be a better solution: http://docs.php.net/manual/en/collator.asort.php We should create the collator when the UI language is chosen and refer to it thereafter. (3) See also: |
Quoting http://php.net/setlocale:
So don’t use |
Currently, the list of language names is probably sorted (collated) by ASCII character order, since, as sacredceltic has pointed out, the languages beginning with non-ASCII characters end up at the bottom of the list. Ideally, the sort order would be determined by the UI language. But if this is not possible, at least it should be possible to choose a collation that would be better across all languages.
Collation could also affect the list of tags and several other sets of strings other than language names.
The text was updated successfully, but these errors were encountered: