2

I'm building a blog with posts in different languages. I'm thinking about doing it like wikipedia, which is :

  • On the front page, show a list of languages with at least one post.

  • If a post is translated, show a link to each translation.

I'm thinking of adding a topbar do redirect users, for instance, that come across the English version when they only speak French :

enter image description here

My question is two-part :

  • Is this a good way to do it or will it annoy users ? (I will remember the user's choice in a cookie)
  • How simple is it to find the user's language, based on his browser and/or his IP address ?
2
  • How can users switch language (again) after a language cookie is set?
    – unor
    Oct 1, 2012 at 21:11
  • They can go back to the front page, or switch through a translation. Also, I'm thinking of not hiding the top bar completely, but leaving a small button at the top of the page.
    – Manu
    Oct 2, 2012 at 5:16

1 Answer 1

3

Assuming a user speaks a certain language when his browser is set to it is tricky. In my experience only after the geo IP lookup resolves to a certain country, it is even acceptable to propose a different language version. Matching this data with browser language settings should improve the confidence, but I don't think this should be relied on without giving a choice.

Keep in mind that Chrome asks to translate foreign sites on default settings, so it would be wise to take steps to disable their topbar if you're going to show yours. You can do so by inserting this code to the head section of the website:

<meta name="google" value="notranslate" />
5
  • Great point about chrome.
    – Manu
    Oct 1, 2012 at 15:38
  • I won't force anything to the user, but I also don't want to lose people who stumble upon the wrong version.
    – Manu
    Oct 2, 2012 at 8:03
  • I would also consider proposing a different language based on the Accept-Language request header. Use a Content-Language response header to assist search engines.
    – Brian
    Oct 3, 2012 at 18:26
  • 1
    @Brian I've been reading up about Accept-Language to answer that question, and my general deduction was that it's not to be relied on, because very few people have that configured properly. Just look at the w3's guide. The sole fact that it's set automatically to match system defaults and it's more of an Under the Bonnet setting (Chrome instructions) makes it much less important in my view.
    – fwr
    Oct 3, 2012 at 20:13
  • 1
    @fwr: IE7+ checks the system Locale, Safari checks the system language. So, that already means that you'll receive a useful Accept-Language pretty often. You can't rely on it, but if Accept-Language is not English, there is a high probability that it is accurate. That's enough to justify bugging a user once (and then remembering not to bug them again).
    – Brian
    Oct 3, 2012 at 21:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.