web\Request getPreferredLanguage()

getPreferredLanguage() public method

Returns the user-preferred language that should be used by this application.

The language resolution is based on the user preferred languages and the languages supported by the application. The method will try to find the best match.

public string getPreferredLanguage ( array $languages = [] )
$languages array

A list of the languages supported by the application. If this is empty, the current application language will be returned without further processing.

return string

The language that the application should use.

doc_Yii
2016-10-30 17:15:54
Comments
Leave a Comment

Please login to continue.