summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2008-01-07 21:38:16 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2008-01-07 21:38:16 +0000
commit68a730c7955dc7b7f1372a8bf574b7a167102a80 (patch)
treeb3b40541fc151b473323003cd7fdc5a84c18ea8b
parent66b7a5cb74d45c2e94b021aff1a24d3b83ca8501 (diff)
downloadbrdo-68a730c7955dc7b7f1372a8bf574b7a167102a80.tar.gz
brdo-68a730c7955dc7b7f1372a8bf574b7a167102a80.tar.bz2
#204946 by theborg, keith.smith: only tell users their language setting will be used for interface presentation, when this actually happens
-rw-r--r--modules/locale/locale.module6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index 61764fa7b..78bbbdaea 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -209,7 +209,7 @@ function locale_user($type, $edit, &$user, $category = NULL) {
// admin interface or edit the user, show the language selector.
if (variable_get('language_count', 1) > 1 && ($type == 'register' && user_access('administer users') || $type == 'form' && $category == 'account' )) {
$languages = language_list('enabled');
- $languages = $languages['1'];
+ $languages = $languages[1];
// If the user is being created, we set the user language to the page language.
$user_preferred_language = $user ? user_preferred_language($user) : $language;
@@ -225,12 +225,14 @@ function locale_user($type, $edit, &$user, $category = NULL) {
'#weight' => 1,
);
+ // Get language negotiation settings.
+ $mode = variable_get('language_negotiation', LANGUAGE_NEGOTIATION_NONE);
$form['locale']['language'] = array(
'#type' => (count($names) <= 5 ? 'radios' : 'select'),
'#title' => t('Language'),
'#default_value' => $user_preferred_language->language,
'#options' => $names,
- '#description' => t('Sets the default site interface and e-mail language for this account.'),
+ '#description' => ($mode == LANGUAGE_NEGOTIATION_PATH) ? t("This account's default language for e-mails, and preferred language for site presentation.") : t("This account's default language for e-mails."),
);
return $form;
}