Backport Request::getPreferredLanguage() from yii2
Merge branch 'patch-2' of https://github.com/zvirusz/yii

* 'patch-2' of https://github.com/zvirusz/yii:
  Backport Request::getPreferredLanguage() from yii2
changelog for #2734