Index: includes/bootstrap.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v retrieving revision 1.340 diff -u -p -r1.340 bootstrap.inc --- includes/bootstrap.inc 7 Jan 2010 04:54:18 -0000 1.340 +++ includes/bootstrap.inc 13 Jan 2010 01:29:47 -0000 @@ -1786,8 +1786,8 @@ function drupal_language_initialize() { */ function drupal_language_types() { return array( - LANGUAGE_TYPE_CONTENT => TRUE, LANGUAGE_TYPE_INTERFACE => TRUE, + LANGUAGE_TYPE_CONTENT => FALSE, LANGUAGE_TYPE_URL => FALSE, ); } Index: includes/locale.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/locale.inc,v retrieving revision 1.241 diff -u -p -r1.241 locale.inc --- includes/locale.inc 8 Jan 2010 13:32:43 -0000 1.241 +++ includes/locale.inc 13 Jan 2010 01:32:07 -0000 @@ -46,9 +46,9 @@ define('LOCALE_LANGUAGE_NEGOTIATION_URL_ * @return * The current content language code. */ -function locale_language_from_content() { - global $language; - return isset($language->language) ? $language->language : FALSE; +function locale_language_from_interface() { + global $language_interface; + return isset($language_interface->language) ? $language_interface->language : FALSE; } /** Index: modules/locale/locale.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/locale/locale.admin.inc,v retrieving revision 1.1 diff -u -p -r1.1 locale.admin.inc --- modules/locale/locale.admin.inc 8 Jan 2010 13:32:43 -0000 1.1 +++ modules/locale/locale.admin.inc 13 Jan 2010 02:00:45 -0000 @@ -476,11 +476,19 @@ function locale_languages_delete_form_su function locale_languages_configure_form() { include_once DRUPAL_ROOT . '/includes/language.inc'; + $configurable_types = array(); + $language_types = language_types_info(); + foreach ($language_types as $type => $info) { + if (!isset($info['fixed'])) { + $configurable_types[] = $type; + } + } + $form = array( '#submit' => array('locale_languages_configure_form_submit'), '#theme' => 'locale_languages_configure_form', - '#language_types' => language_types_configurable(), - '#language_types_info' => language_types_info(), + '#language_types' => $configurable_types, + '#language_types_info' => $language_types, '#language_providers' => language_negotiation_info(), ); Index: modules/locale/locale.module =================================================================== RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v retrieving revision 1.281 diff -u -p -r1.281 locale.module --- modules/locale/locale.module 10 Jan 2010 19:06:47 -0000 1.281 +++ modules/locale/locale.module 13 Jan 2010 01:30:39 -0000 @@ -24,9 +24,9 @@ define('LOCALE_LANGUAGE_NEGOTIATION_URL' define('LOCALE_LANGUAGE_NEGOTIATION_BROWSER', 'locale-browser'); /** - * The language is determined using the current content language. + * The language is determined using the current interface language. */ -define('LOCALE_LANGUAGE_NEGOTIATION_CONTENT', 'locale-content'); +define('LOCALE_LANGUAGE_NEGOTIATION_INTERFACE', 'locale-interface'); /** * The language is set based on the user language settings. @@ -482,14 +482,13 @@ function locale_entity_info_alter(&$enti */ function locale_language_types_info() { return array( - LANGUAGE_TYPE_CONTENT => array( - 'name' => t('Content'), - 'description' => t('If a piece of content is available in multiple languages, the one matching the content language will be used.'), - ), LANGUAGE_TYPE_INTERFACE => array( 'name' => t('Interface'), 'description' => t('The interface labels will be displayed in the interface language.'), ), + LANGUAGE_TYPE_CONTENT => array( + 'fixed' => array(LOCALE_LANGUAGE_NEGOTIATION_INTERFACE), + ), LANGUAGE_TYPE_URL => array( 'fixed' => array(LOCALE_LANGUAGE_NEGOTIATION_URL), ), @@ -547,13 +546,13 @@ function locale_language_negotiation_inf 'description' => t('The language is determined from the browser\'s language settings.'), ); - $providers[LOCALE_LANGUAGE_NEGOTIATION_CONTENT] = array( - 'types' => array(LANGUAGE_TYPE_INTERFACE), - 'callbacks' => array('language' => 'locale_language_from_content'), + $providers[LOCALE_LANGUAGE_NEGOTIATION_INTERFACE] = array( + 'types' => array(LANGUAGE_TYPE_CONTENT), + 'callbacks' => array('language' => 'locale_language_from_interface'), 'file' => $file, 'weight' => 8, - 'name' => t('Content'), - 'description' => t('The interface language is the same as the negotiated content language.'), + 'name' => t('Interface'), + 'description' => t('The content language is the same as the negotiated interface language.'), ); return $providers; Index: modules/node/node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.module,v retrieving revision 1.1206 diff -u -p -r1.1206 node.module --- modules/node/node.module 12 Jan 2010 23:04:47 -0000 1.1206 +++ modules/node/node.module 13 Jan 2010 02:04:37 -0000 @@ -1232,52 +1232,6 @@ function node_build_content($node, $view } /** - * Implements hook_language_negotiation_info(). - */ -function node_language_negotiation_info() { - $providers = array(); - - $providers['node-language'] = array( - 'types' => array(LANGUAGE_TYPE_CONTENT), - 'callbacks' => array('language' => 'node_language_provider'), - 'file' => drupal_get_path('module', 'node') . '/node.module', - 'name' => t('Node'), - 'description' => t('The current node language is used.'), - ); - - return $providers; -} - -/** - * Return the language of the current node. - * - * @param $languages - * An array of valid language objects. - * - * @return - * A valid language code on succes, FALSE otherwise. - */ -function node_language_provider($languages) { - require_once DRUPAL_ROOT . '/' . variable_get('path_inc', 'includes/path.inc'); - - $path = isset($_GET['q']) ? $_GET['q'] : ''; - list($language, $path) = language_url_split_prefix($path, $languages); - $language = $language ? $language : language_default(); - $path = drupal_get_normal_path($path, $language->language); - - // We cannot use args now. - $path = explode('/', $path); - // Act only if we are in a node page. - if (isset($path[0]) && isset($path[1]) && $path[0] == 'node' && $nid = intval($path[1])) { - // We cannot perform a node load here. - $result = db_query('SELECT n.language FROM {node} n WHERE n.nid = :nid', array(':nid' => $nid))->fetchAssoc(); - return $result['language']; - } - - return FALSE; -} - -/** * Generate an array which displays a node detail page. * * @param $node