If I enter something like "eng;q=0,zho", this disallows English, but "eng" is nevertheless displayed over the icon when I'd expect "zho".
Seems like it'd be better to either determine the highest weighted languages and display the code for the highest weighted language or "mul" (an ISO 639-2 language code indicating multiple languages) if there are multiple highest weighted languages.
Alternatively, one could do no weighting at all and display something indicating multiple languages.
Also, I'm not sure if invalid input like "???" should be displaying anything. (It displays "???".)
If I enter something like "eng;q=0,zho", this disallows English, but "eng" is nevertheless displayed over the icon when I'd expect "zho".
Seems like it'd be better to either determine the highest weighted languages and display the code for the highest weighted language or "mul" (an ISO 639-2 language code indicating multiple languages) if there are multiple highest weighted languages.
Alternatively, one could do no weighting at all and display something indicating multiple languages.
Also, I'm not sure if invalid input like "???" should be displaying anything. (It displays "???".)