cockpit
cockpit copied to clipboard
Wrong sorting: list of languages
In the list at the sidebar the list is sorted by the key, not the value. An example list from the config.php:
'languages' => [
'danish' => 'Dänisch',
'german' => 'Deutsch'
'dutch' => 'Niederländisch',
]
Output will be
1. Dänisch
2. Niederländisch
3. Deutsch
...but it should be
1. Dänisch
2. Deutsch
3. Niederländisch
So the bug is: It's ordered by the array-key, not the value, which it should. And that's confusing, especially for newbies, who are only editing the text-fields.
I was wrong. Excuse me. There is actually no sorting. Neither by key nor by value. It depends on the list you've add in the config.php. Nevertheless it would be good to sort by the values.
Please close this
Please close this
Why? It's still not sorted.
... but it is sorted... by the top-down line order (you said this yourself @SebastianBerlin).
Line order sorting also gives the Dev much more flexibility than a forced A->Z sort. Sorting by alphabetical would also override to all existing sites which have already set their preferred ordering.
Well, no.
- There is no "flexibility" if you use multiple languages (for the admin-dashboard). In every language there has to be a different sorting and you can NOT fix that in any way.
It's a failure by construction, at least not well-wrought – and that function is necessary.
- Of course, there should be an option to choose, what you want, and to prevent problems with existing configs: Manual by config-file AND logical sorting by the value.