Mixed-case langtags are present and not properly handled.
Go to a Commons SVG file such as File:First Ionization Energy.svg
Use the "Render this image in" dropdown to select simplified Chinese (zh-Hans). Click Go.
The image is displayed in English rather than Chinese. The page url is
So the user interface for showing different language versions of switch-translated SVG files does not work.
The URL is generated by a form that manages the dropdown. The input comes from a select with name="lang" and an option with value="zh-Hans"; the dropdown result is the URL argument ?lang=zh-Hans.
If the URL is modified to ?lang=zh-hans, then Chinese is displayed. A working (lowercase langtag) URL is:
The problem is more widespread than just the Commons file page interface.
SVG files that inserted using mixed-case IETF langtags such as
[[File:First Ionization Energy.svg|thumb|lang=zh-Hans]]
do not work (ie, display English) while lowercase-only IETF langtags such as
[[File:First Ionization Energy.svg|thumb|lang=zh-hans]]
do work (display Chinese). Same bug in a different place.
With the mixed-case langtag, the generated HTML goes directly to the English version; apparently the wiki markup did an API call with the mixed-case langtag, the mixed-case langtag was not found, so the English default was returned. Providing a lowercase langtag found the Chinese version and the HTML accesses the *-langzh-hans-*.png.
The "Render this image in" problem could be fixed by lowercasing the value= in the option elements when the page built.
More generally, the lang= argument should accept mixed-case IETF langtags and lowercase them to canonize them.
Giving mixed-case langtags used to work....