You are here

function language_cookie_language in Language Cookie 7

Same name and namespace in other branches
  1. 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'
language_cookie_language_negotiation_info in ./language_cookie.module
Implements hook_language_negotiation_info().

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;
}