function language_cookie_language in Language Cookie 7
Same name and namespace in other branches
- 7.2 language_cookie.module \language_cookie_language()
Identify language from a cookie parameter.
Parameters
$languages: An array of valid language objects.
Return value
A valid language code on success, FALSE otherwise.
1 string reference to 'language_cookie_language'
File
- ./
language_cookie.module, line 127 - Language Cookie module.
Code
function language_cookie_language($languages) {
$param = variable_get('language_cookie_param', 'language');
return isset($_COOKIE[$param]) && in_array($_COOKIE[$param], array_keys($languages)) ? $_COOKIE[$param] : NULL;
}