function admin_language_preferred in Administration Language 7
Same name and namespace in other branches
- 6 admin_language.module \admin_language_preferred()
Determine the preferred language of the given user.
1 call to admin_language_preferred()
- _admin_language_user_form_add_language_select in ./
admin_language.module - Callback to add administration language select widget.
File
- ./
admin_language.module, line 625 - Makes admin pages be displayed in the administrator's preferred language.
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';
}
}