Right I have an Android device set to Spanish (the entire device). The Accept-Language header appears like this: "es-ES, en-US". The issue is that it still prefers the en-US locale when it should use the first one. The issue is in the parse-http-accept-header function.
Right I have an Android device set to Spanish (the entire device). The Accept-Language header appears like this: "es-ES, en-US". The issue is that it still prefers the en-US locale when it should use the first one. The issue is in the parse-http-accept-header function.
Simply change
To
As this accomplishes the same thing and preserves the order.