Currently the installer selects the first language code from the Accept-Language HTTP header that is known to MediaWiki even when it is not translated. For example the language code aa (Afar) is known to MediaWiki but it has no translation and therefor the user interface language is English.
On the HTTP header
Accept-Language: aa,nl;q=0.5
the installer selects lang="aa" and shows English user interface. It would be better to ignore the untranslated language code aa and use the next language code that is translated, here nl.
Steps to reproduce:
$ curl -L -H 'Accept-Language: aa,nl;q=0.5' 'http://localhost/mediawiki/mw-config/' 2> /dev/null | head -2
current result:
<!DOCTYPE html> <html dir="ltr" lang="aa">
expected result:
<!DOCTYPE html> <html dir="ltr" lang="nl">
The UniversalLanguageSelector has a implementation that support this case:
$ curl -L -H 'Accept-Language: aa,nl;q=0.5' 'http://localhost/mediawiki/' 2> /dev/null | head -2
<!DOCTYPE html> <html class="client-nojs" lang="nl" dir="ltr">
The two implementations should be merged and refactored to a single place in core.