Last modified: 2014-02-12 23:45:52 UTC
Hi, currently http://wikipedia.org seems to recognize some mobile browser and redirect to http://en.m.wikipedia.org in some cases (couldn't find the regular pattern). Also http://m.wikipedia.org will recognize the browser locale and send the user automatically to the corresponding xx.m.wikipedia.org. So the pieces are in place, just not so integrated. It would be good to have wikipedia.org doing the work of recognizing a mobile browser and the locale in order to redirect the user automatically to xx.m.wikipedia.org. This would help not only the users typing the URL manually, but also e.g. device vendors willing to have a pre-configured Wikipedia bookmark in their browsers, since one URL would serve all their users regardless of locale, region, etc.
The JavaScript on the http://wikipedia.org portal does not appear to do any mobile checks or forwarding; it just checks browser language, saves a preference cookie, and inserts a search parameter into the search box if present in the query string. If there are mobile checks, they might be in the .php side that loads up that placeholder page?
Ah, what seems to happen is that xx.wikipedia.org detects the mobile browser and forwards you automatically to xx.m.wikipedia.org - but no wikipedia.org
Correct, As part of the porting project (http://meta.wikimedia.org/wiki/Mobile_Projects) we'll be taking a look at http://www.enrise.com/2011/02/mobile-device-detection-with-wurfl-and-varnish/ and making this a ton easier :)
Is this implemented?
Not yet. If we were to pick this up we'd want to make /home/wikipedia/common/extract2.php be mobile friendly. This might mean we retool http://meta.wikimedia.org/wiki/Www.wikipedia.org or completely.
The bad news is that extract2.php is a hideous piece of garbage. The good news is that, for all its flaws, it really just pulls the "Www.wiki$FOO.org template" page from meta. Any meta sysop (or WMF staff) can edit that page and the changes will show up immediately.
I think this bug is more appropriate for the country-specific landing pages, and bug 30389 is specifically for the wikipedia.org portal.
Instead of forwarding to xx.m.wp, there is a proposal for an India-specific landing page. This approach could be generalized for all countries. Making this dependent on 30389 because detecting a mobile browser and delivering something appropriate is step one.
+i18n
I'm closing for the following reasons 1) Lack of activity (9 months) 2) I think websites that decide which language I want to go to are evil. Currently www.wikipedia.org on mobile does not redirect. This in my opinion is the correct behaviour. If I want french Wikipedia I go to fr.wikipedia.org and if I want Spanish I go to es.wikipedia.org. If I am currently on holiday in Portugal and go to wikipedia.org I except a generic landing page not to be redirected to pt.m.wikipedia.org 3) bug 30389