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. |
Please login to continue.