? .DS_Store ? language_negotiation_00.patch ? modules/.DS_Store ? profiles/.DS_Store ? sites/.DS_Store ? sites/default/files ? sites/default/settings.php Index: includes/bootstrap.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v retrieving revision 1.256 diff -u -p -r1.256 bootstrap.inc --- includes/bootstrap.inc 30 Nov 2008 01:05:16 -0000 1.256 +++ includes/bootstrap.inc 2 Dec 2008 16:02:41 -0000 @@ -175,23 +175,14 @@ define('DRUPAL_KILOBYTE', 1024); define('LANGUAGE_NEGOTIATION_NONE', 0); /** - * Path based negotiation with fallback to default language - * if no defined path prefix identified. + * Path based negotiation. */ -define('LANGUAGE_NEGOTIATION_PATH_DEFAULT', 1); +define('LANGUAGE_NEGOTIATION_PATH', 1); /** - * Path based negotiation with fallback to user preferences - * and browser language detection if no defined path prefix - * identified. + * Domain based negotiation. */ -define('LANGUAGE_NEGOTIATION_PATH', 2); - -/** - * Domain based negotiation with fallback to default language - * if no language identified by domain. - */ -define('LANGUAGE_NEGOTIATION_DOMAIN', 3); +define('LANGUAGE_NEGOTIATION_DOMAIN', 2); /** * For convenience, define a short form of the request time global. Index: includes/locale.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/locale.inc,v retrieving revision 1.195 diff -u -p -r1.195 locale.inc --- includes/locale.inc 16 Nov 2008 19:41:14 -0000 1.195 +++ includes/locale.inc 2 Dec 2008 16:02:42 -0000 @@ -456,29 +456,27 @@ function locale_languages_configure_form '#type' => 'radios', '#options' => array( LANGUAGE_NEGOTIATION_NONE => t('None.'), - LANGUAGE_NEGOTIATION_PATH_DEFAULT => t('Path prefix only.'), - LANGUAGE_NEGOTIATION_PATH => t('Path prefix with language fallback.'), - LANGUAGE_NEGOTIATION_DOMAIN => t('Domain name only.')), + LANGUAGE_NEGOTIATION_PATH => t('Path prefix.'), + LANGUAGE_NEGOTIATION_DOMAIN => t('Domain name.')), '#default_value' => variable_get('language_negotiation', LANGUAGE_NEGOTIATION_NONE), '#description' => t("Select the mechanism used to determine your site's presentation language. Modifying this setting may break all incoming URLs and should be used with caution in a production environment.") ); - $form['submit'] = array( - '#type' => 'submit', - '#value' => t('Save settings') + $form['language_negotiation_fallback'] = array( + '#title' => t('Language negotiation fallback'), + '#type' => 'checkbox', + '#default_value' => variable_get('language_negotiation_fallback', TRUE), + '#description' => t("Display the site in the user's browser language or your site's default language if a match for Language negotiation cannot be found."), ); - return $form; + $form['language_user_override'] = array( + '#title' => t('Allow user preferred language'), + '#type' => 'checkbox', + '#default_value' => variable_get('language_user_override', FALSE), + '#description' => t("Allow authenticated users to select in which language to view your site. This will not affect your site's presentation language, unless Language negotiation has been set to None."), + ); + return system_settings_form($form); } /** - * Submit function for language negotiation settings. - */ -function locale_languages_configure_form_submit($form, &$form_state) { - variable_set('language_negotiation', $form_state['values']['language_negotiation']); - drupal_set_message(t('Language negotiation configuration saved.')); - $form_state['redirect'] = 'admin/settings/language'; - return; -} -/** * @} End of "locale-languages-negotiation" */ Index: modules/locale/locale.module =================================================================== RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v retrieving revision 1.232 diff -u -p -r1.232 locale.module --- modules/locale/locale.module 23 Nov 2008 16:00:06 -0000 1.232 +++ modules/locale/locale.module 2 Dec 2008 16:02:42 -0000 @@ -50,10 +50,9 @@ function locale_help($path, $arg) { return '

' . t('Add all languages to be supported by your site. If your desired language is not available in the Language name drop-down, click Custom language and provide a language code and other details manually. When providing a language code manually, be sure to enter a standardized language code, since this code may be used by browsers to determine an appropriate display language.') . '

'; case 'admin/settings/language/configure': $output = '

' . t("Language negotiation settings determine the site's presentation language. Available options include:") . '

'; - $output .= ''; + $output .= ''; $output .= '

' . t('The path prefix or domain name for a language may be set by editing the available languages. In the absence of an appropriate match, the site is displayed in the default language.', array('@languages' => url('admin/settings/language'))) . '

'; return $output; case 'admin/build/translate':