http_accept_language released as a gem
- January 5th, 2010
- Posted in Gems . Ruby
- Write comment
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.
Thanks for the inspiration: It might be a good idea to turn my own plugin, http://github.com/awendt/content-negotiation, into a gem.
Back when I wrote it, I’m pretty sure I looked at your plugin, but I wanted the header turned into an array of symbols, not strings. And I didn’t need the region part, so I wrote my own plugin.