Platonides wrote:
Aryeh Gregor wrote:
Tangentially, is there any actual reason we couldn't allow any language's alias (e.g., for special page names or namespaces) to work in any other language? We'd have to make sure we have a moderately sane way of resolving conflicts, but those should be extremely uncommon.
You get a request for page Foo:Bar. It could be a page name, or Foo could mean Special in Bantu. How do you check (efficiently) over 300 languages?
With array_key_exists(), surely? It's (AFAIK) a (nearly) constant-time hash lookup.
Of course, you don't want to have to load 300 Messages*.php files just to populate that array in the first place, but that just means that we'd have to consolidate the namespace aliases into a single file if we wanted to do this, rather than scattering them across hundreds of files like we do now.
I've actually long wanted something like this for Commons. At the very least, It Would Be Nice If all the localized aliases of the File/Image namespace were added to $wgNamespaceAliases for Commons.