Closed mschoeffmann closed 1 year ago
v3.2.2 should address this
Works like a charm. Thank you!
If you like this module donβt forget to star this repo. Make a tweet, share the word or have a look at our https://locize.com to support the devs of this project.
There are many ways to help this project π
π Bug Report
Some "3-character" IETF BCP 47 language tags are recognized as a different language (just shortened to 2 characters).
For example: Setting a Chrome Browser to "Hawaiian" should return the official tag
haw
, but now it returnsha
which is the code for "Hausa". Also "Konkani" (=kok
), which is in the official IETF list, returnsko
which is "Korean".So even if this middleware is only meant to detect "2ch" ISO 639-1 codes, it should at least not return wrong languages.
Reference Articles:
Extension for testing it in Chrome:
To Reproduce
Un-commenting
lookupHeader
andlookupHeaderRegex
in this example returns the right values in this use-case.Make request in Hawaiian (US), Hawaiian, Kokani and with Google Chrome, the extension mentioned above will help ...
Expected behavior
Returning the correct locale, or at least not the wrong one:
Your Environment