add support for multiple languages
This commit is contained in:
parent
db3bee1aab
commit
3fdb23374c
4 changed files with 126 additions and 35 deletions
|
|
@ -184,6 +184,22 @@
|
|||
{
|
||||
return $_SERVER['REQUEST_METHOD'];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get languages from browser setting.
|
||||
*
|
||||
* @return string Browser setting for accepted languages.
|
||||
*/
|
||||
public function getBrowserLanguages()
|
||||
{
|
||||
if(array_key_exists('HTTP_ACCEPT_LANGUAGE', $_SERVER)) {
|
||||
return $_SERVER['HTTP_ACCEPT_LANGUAGE'];
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue