-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Unexpected case sensitivity in the language search results #18
Comments
The comment is interesting although I think the bcp-47 standard is specific on the cases to be used for language identifiers and country codes. So in fact, I think the program is working according to the standard. |
Now when I try "En" in the demo (http://mui-language-picker-demo.org.s3-website-us-east-1.amazonaws.com/), I have to scroll a very long time to get past the "English"es and find "En (enc)". |
By convention, the different subtags of a language tag are formatted differently (language in lowercase, script in Title case, region in CAPS, etc.), however, the case difference doesn't change the meaning. "In [BCP47], subtags can consist of upper or lowercase ASCII letters (the case carries no distinction) or ASCII digits." Language Tags and Locale Identifiers for the World Wide Web I don't know if that makes a difference to the logic of the program. If a user enters "En" should you give preference to language names over language codes? |
I added a change that puts the canonical name at the beginning of the list of matches. |
For reference: 106d5ac |
When I type "es-CO" there are two results: first "es-CO" and second "es". This makes sense to me.
When I type "es-Co" or "es-co" there is only one result: "es".
Similarly, if I type "en", then English ("en") is the first result.
However, "En" only gives En ("enc") as the second result and English ("en") as the 7th result, which I have to scroll to find.
The text was updated successfully, but these errors were encountered: