Last modified: 2014-09-24 01:30:36 UTC
Created attachment 3949 [details]
Checks available language codes of Template:Languages to set xml:lang dynamically
Currently xml:lang is set by $wgContentLang only. It's not good to search engines to determine the real content language of a specific page.
The patch checks available language codes of Template:Languages to set xml:lang dynamically. It's particularly important to http://wikimania2007.wikimedia.org or other sites used Template:Language.
Created attachment 3955 [details]
grab the language code from URL (if present) to initialize $wgContLang
This patch file is in the universal format. Hopefully it is straightforward to apply it.
Please consider patch this to Wikimania sites ASAP, thanks a lot!
This patch is far too project-specific and mangles configuration settings according to an apparently arbitrary title pattern. I would not recommend using it.
It seems that a better choice would be some kind of magic word which can be used to override the various language meta tags for a page.
I agree with Rob now since I just found a side effect yesterday. Once we change wgContLanguage, namespaces like Category or Template may encounter problem if they are not in English.
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Barabbas, I've added the "reviewed" keyword since you did get a code review. Are you interested in checking out current trunk, seeing whether the situation still requires fixing, and trying to update your patch against trunk?
I'm afraid that I'm not qualified to check out current trunk anymore since it's been long long time ago.
(In reply to comment #6)
> Barabbas, I've added the "reviewed" keyword since you did get a code review.
> Are you interested in checking out current trunk, seeing whether the situation
> still requires fixing, and trying to update your patch against trunk?
(In reply to comment #7)
> I'm afraid that I'm not qualified to check out current trunk anymore since
> been long long time ago.
Barabbas, thanks; new patches are always welcome ([[mw:Git/Tutorial]]).
I'm closing this old bug since:
- The original use case has been solved by the introduction of the page content language and by using the Translate extension, which sets the page content language correctly
- The general need to set the page content language on-wiki is covered by bug 9360, bug 49588, etc. (where most discussion has occurred)
*** This bug has been marked as a duplicate of bug 9360 ***