You are here

function redirect_language_load in Redirect 7

Same name and namespace in other branches
  1. 7.2 redirect.module \redirect_language_load()

Load a language object by its language code.

@todo Remove when http://drupal.org/node/660736 is fixed in Drupal core.

Parameters

$language: A language code. If not provided the default language will be returned.

Return value

A language object.

2 calls to redirect_language_load()
redirect_list_form in ./redirect.admin.inc
@file Administrative page callbacks for the redirect module.
redirect_list_table in ./redirect.admin.inc

File

./redirect.module, line 1403

Code

function redirect_language_load($language = LANGUAGE_NONE) {
  $languages =& drupal_static(__FUNCTION__);
  if (!isset($languages)) {
    $languages = language_list();
    $languages[LANGUAGE_NONE] = NULL;
  }
  return isset($languages[$language]) ? $languages[$language] : NULL;
}