[openstreetmap-website] preferred language settings sometimes not correctly recognized (#505)
Tom Hughes
notifications at github.com
Fri Oct 4 14:05:46 UTC 2013
The current behaviour is actually what [RFC 2616](http://www.rfc-editor.org/rfc/rfc2616.txt) section 14.4 requires... In fact we actually patch the http_accept_language gem to make it comply with the RFC algorithm. Specifically the RFC says:
> A language-range matches a language-tag if it exactly equals the tag, or if it exactly equals a prefix of the tag such that the first tag character following the prefix is "-".
So a language range from the Accept-Language header can only ever match more specific languages, and not less specific.
That said we do also do some fallback where if we don't get any match at all we start stripping off trailing components and having another go.
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/505#issuecomment-25700845
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20131004/e91b9ef1/attachment.html>
More information about the rails-dev
mailing list