Steps to replicate the issue (include links if applicable):
- Open https://www.wikidata.org/wiki/Wikidata:Main_Page , you need to log in since language selection is unavailable to the logged-out users
- Click any of the language converter-supported language variant in the ULS (for example "中文(中国大陆)", "中文(简体)", "中文(臺灣)", "中文(繁體)") or language variant without language converter support in the ULS (for example "بهاس ملايو")
- Type "Fish", or respective word (魚 for zh-Hant and zh-Hant-TW; 鱼 for zh-Hans and zh-Hans-CN; ايکن for ms-Arab)
What happens?: The dropdown option of the search bar all displayed English as the initial fallback, instead of following language fallback chain sequence as per description at https://www.mediawiki.org/wiki/Manual:Language
This situation does not happen when the languages selected were "中文" (zh) or "Bahasa Melayu" (ms) because both of them return the labels in respective language.
Suspected might be related to the format of language variant "langcode-scriptvariant(-geocode)", because different to the normal language code, the language variants have "-" in between, although this has not been verified.
What should have happened instead?:
The search bar content first should return respective language variant successfully, if failed then return the higher level of language fallback. For example: "zh" as the higher fallback default for zh-Hant, zh-Hans, zh-Hant-TW, zh-Hans-CN etc; and "ms" as the higher fallback default for ms-Arab. The English fallback "en" should act as the last resort for a language fallback.
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):
This situation occurs regardless of switching parsers (Parsoid or Legacy Parser.php) or skins (Vector-2022 or Minerva)










