It detects the language of the user.

This article is quite old.Time flies when you're having fun. I've been writing for my blog for a long time. Stuff changes fast, especially in the Ruby world. That's why I've put this warning on old posts. The article might still be valid, though.

http_accept_language released as a gem

I released an old Rails plugin as gem today. Slowly but surely, all my plugins will be converted to gems.

This time it's an old one: http_accept_language

  • Splits the http-header into languages specified by the user
  • Returns empty array if header is illformed.
  • Corrects case to xx-XX
  • Sorted by priority given, as much as possible.
  • Gives you the most important language
  • Gives compatible languages

For more information, read the README on GitHub.

comments powered byDisqus