The Hugo sort func seems to sort on the rune value which is not the french natural order.
In my Go scripts I use the collate and sort packages that takes the locale into account, french locale in this case. I don’t see how to pass these arguments to the Hugo sort func.
We don’t currently. This is the function used for almost all. string sorting (Go’s template package have some map sorting that is a little bit out of control):
When I added that we did discuss what you talk about, but opted for the simpler solution, still much better than what we had.
We do a lot of sorting in Hugo, and I’m hesitant to add that kind of sorting for all/default … But we should do something about it.
It would be a nice complement to the handy lang.NumFmt. We could imagine to have a i18n lang.SortSlice func taking the language.xxx locale (or language tag) and sort order as arguments. And possibly also an argument to specify if the original order of equal elements needs to be preserved.(sort.SliceStable() or sort.Slice() in Go)