<p>The current behaviour is actually what <a href="http://www.rfc-editor.org/rfc/rfc2616.txt">RFC 2616</a> 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:</p>
<blockquote>
<p>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 "-".</p>
</blockquote>
<p>So a language range from the Accept-Language header can only ever match more specific languages, and not less specific.</p>
<p>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.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href='https://github.com/openstreetmap/openstreetmap-website/issues/505#issuecomment-25700845'>view it on GitHub</a>.<img src='https://github.com/notifications/beacon/uTRSc6ihLa7Shf84BpiOpn8YBWCAcJfN3rcNOrjuNEdSWZUKFu2W4II2NBB8GpVC.gif' height='1' width='1'></p>