Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept locales which only match RFC2616 format #40

Closed
wants to merge 1 commit into from

Conversation

kostyantyn
Copy link
Contributor

@DouweM
Copy link
Collaborator

DouweM commented Mar 15, 2014

The HTTP 2.0 (HTTPbis) draft explicitly specifies it will use Language Tags as defined by RFC5646 for the Accept-Language header, which does explicitly mention tags like "es-419".

As pull request #33, this StackOverflow question, this issue and this bug report show (these are the first couple of Google search results), there is a practical need to already support this now, as browsers are already sending these tags to servers implementing HTTP 1.x.

After all, the point of this gem isn't to be a perfectly compliant implementation of RFC2616, but rather to be practically useful to determine what localization the user is likely looking for. If this includes slightly straying from the original RFC and the algorithm proposed therein (as we're already doing, as described in the readme), I will happily do so.

Thanks for your patch, but I will not merge it in this form. If you think there are practical reasons I should reconsider, I would gladly hear them.

@DouweM DouweM closed this Mar 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants