On Tue, 2007-20-02 at 22:31 +0100, Platonides wrote:
Also interesting having a $2 for commons, ie.
http://commons.wikimedia.org/wiki/$1?uselang=$2
What we want here is some configuration so you would have an optional $2
parameter selecting the project.
How do you set the dafault value for $2?
Using a default value of $wgContentLanguage would work for us, but is
not optimal. Some odd domains are not equal to the language code (eg:
$wgContentLanguage of simple is en).
Plus, some external URLs may not need a language code,
or only some of them.
Right. Those wouldn't have a $2 in them, so they'd work like they do
now.
Wikitravel uses format
http://wikitravel.org/$2/$1
but if it had a page
named Sh:sh you would end up at
http://wikitravel.org/sh/sh (requested
URL was not found on this server).
So, I think what you're saying here is if there's a namespace on the
interwiki server that is the same string as a language code, then you'll
get false matches for the interwiki pattern.
While I agree that this is possible in principle, in practise projects
that use language codes don't have page namespaces that clash with those
language codes, for this very reason.
And if they do, then we don't use this shortcut for those projects.
~Evan