Aryeh Gregor hett schreven:
This would absolutely be possible as a "mostly
works" solution for
category sorting. It would mostly just need to have the appropriate
code written. The only serious problem with it is that if the rules
for automatic default sorting changed, a script of some sort would
probably have to reparse all pages in some cases to figure out the
original sort key provided, which would be kind of expensive.
Of course, this solution is actually woefully incomplete even for
German. It only affects category pages, not the zillion other places
where pages are sorted by names (Special:AllPages, etc.). But it
would be a reasonable step forward if anyone wanted to do the coding
required.
If I continue my plain layman approach, I would add a new unique column
"page_sortkey" to the table "page", that consists of the (uppercased,
str_replaced as described in my previous post, and with whatever
replacements else necessary to make it sort properly) pagename, " "
(two whitespaces) as separator, and the page_id of the page. The page_id
adds uniqueness, the two whitespaces make short words always sort before
long words, as " " is the first character byte-order-wise and two
whitespaces can never occur in page titles.
Special:Allpages would then "ORDER BY 'page_sortkey'" instead of
"ORDER
BY 'page_title'". If the (language-specific) function that converts the
pagename to the sortkey string is good, that should make Allpages sort
properly. The only remaining problem would be that pairs like "Günther"
and "Gunther" would always sort according to the page_id instead of
first "Gunther" and then "Günther". Could perhaps be solved by also
making the strpos of the first character that was replaced by our
function part of the sortkey, but I guess that would be over the top ;-)
But most likely I missed some problem, that makes this not work.
Marcus Buck
User:Slomox