You are here

function admin_language_preferred in Administration Language 6

Same name and namespace in other branches
  1. 7 admin_language.module \admin_language_preferred()

Determine the preferred language of the given user.

1 call to admin_language_preferred()
admin_language_user in ./admin_language.module
Implementation of hook_user().

File

./admin_language.module, line 476
Makes sure all admin pages are displayed in the preferred language of the administrator.

Code

function admin_language_preferred($account) {
  $language_list = drupal_map_assoc(array(
    'admin',
    'default',
  ));
  $language_list += language_list();
  if (isset($account->admin_language) && isset($language_list[$account->admin_language])) {
    return $account->admin_language;
  }
  else {
    return 'admin';
  }
}