2011/8/15 Brion Vibber <brion(a)pobox.com>om>:
I am super happy about this going in as a general
concept -- we'll want to
make sure there's a way for 'generic' multilingual sites (like meta and
commons) to tag pages with their languages as well.
Yeah, I forgot to mention that, when the Translate extension is
enabled on Meta (I heard there are plans for that), the page
translation feature makes use of the page content language hook to set
the right language, which will improve its multilingualism.
For other wikis (Commons, MediaWiki.org
), we might make a simple
extension that just checks the subpage if it is a language code, and
sets the language accordingly. (Is easy to do).
For Translate and Incubator, language can be easily
pulled from the title as
language codes get used as a page title component (suffix or prefix or some
such). However for more general pages this may end up being better defined
as metadata tied to the page, which'll need storage and being kept across
export/import, delete/undelete, etc.
Yeah, the value would probably have to be stored somewhere if we want
to be able to implement a magic word or "language selector" to mark
the language of a page.
Btw, see bug 9360 and 28970 for that.
But, now that
I am writing this anyway, I have a question: should
magic words like CURRENTMONTH and NUMBEROFARTICLES use the page
content language rather than wgContLang? It would be more logical (and
on Incubator even wanted:
) but I am not sure if it would break things, e.g. when just with a
I would tend to expect it to use the page content language; for templates of
course you may well have the issue that the template is trying to work in a
particular language, say to generate a link, so that may require some
If we pull a template into a parent page, does the template have its own
inherent languageness? This is all relevant also to tagging output for
languages to aid with screen readers, translation tools, search engines etc
-- bug 14649 <https://bugzilla.wikimedia.org/show_bug.cgi?id=14649> gives an
example of this with messages but templates can have the same issues.
I changed magic words to follow page content language on my localhost,
and then I tried to include a template which is parsed as Dutch
(Template:Wn/nl/Page with Incubator extension) into a page following
the site content language. Apparently magic words in the template are
parsed according to the site language (i.e. the page where the
template is included).
So I will change these time and number-formatting magic words, but I
won't change the NAMESPACE(E) magic word as this really depends on the
This will also in fact change their output in system messages (and on
the respective MediaWiki namespace pages), but afaik they are never
used in system messages.