Backport Request::getPreferredLanguage() from yii2