Language Select Screens Die!
One of the things I've done way too much of is the creation of language select pages. These are the types of pages on a website that visitors first encounter asking them to pick their language and they are a pain in the ass.
Weirdly, it's a trend to have language select pages that contain a country flag. There's a pretty strong arguments against this approach though, which makes a lot of sense considering there is no real correlation between country and language. It seems to me that any country with any amount of immigration knows this is true.
Now, I may not like language select pages as a web developer, which I'll go into more detail on in a minute, but I reeeaaaallllllly hate them when I visit a website that uses them. No matter what link I go to, whether I go directly to a page from a search engine or a bookmark, unless I've been through their language page I get forced to deal with it.
That's just jarring and a little rude to me. I have the link. Just show me the stuff already!
Anyway, this begs the question, "WTF?" because nine times out of ten the website already knows what language I want pages served in.
Why It's Stupid...
See, all modern browsers send this data along with every page request but, as evidenced by the proliferation of language select pages, web developers have yet to take advantage of that info.
In FireFox 3 go to Tools->Options->Content->Languages
In IE 7 go to Tools->Internet Options->Languages
In Google Chrome click on the little wrench icon in the upper right hand corner and select Options from the drop down. Select Minor Tweaks and choose Change fonts and language settings.
In php you can access this info using the below variable.
<?php echo $_SERVER; ?>
In ASP.NEW you use the below:
<% Response.Write(Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")) %>
In PERL the below does it:
On my computer using FireFox 3 this is the value:
So right there it's saying I'm in the US and I prefer English as my language. It's trivial for any programmer worth their salt to parse that into something usable. Use that as my preference instead of wasting my time by making me click on a stupid flag.