When I did this, I used the stable view so that values ββwith the same relative q-value remained in the same relative order. I believe this is logical and probably reflects the intent of the specification :
Please note that some recipients consider the order in which language tags are listed as an indicator of descending priority, especially for tags that are assigned equal qualitative values ββ(the value does not match q = 1). However, this behavior cannot be relied upon. To ensure consistency and maximize interoperability, many user agents assign each language a tag with a unique quality value, as well as listing them in decreasing order of quality. An additional discussion of language priority lists can be found in Section 2.3 of RFC4647 .
As an example, where this behavior might be desirable if you have a layer / caching middleware and you are processing Accept* headers in an unstable way (e.g. maybe random selection if they all have the same q value), while as you may not be mistaken, but the results will be unpredictable, and this can cause problems at the cache level and a poor user interface (for example, changing the language between pages for some obvious reason).
source share