On 8/31/09 1:12 PM, Ilmari Karonen wrote: > Platonides wrote: >> 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.
While a good, performant implementation might be a little hairy, and the idea of name conflicts makes me break out in cold sweats, it *would* be nice if that worked, yes. :D -- brion _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l