Index: i18n.admin.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/i18n/i18n.admin.inc,v retrieving revision 1.2.2.5 diff -u -p -r1.2.2.5 i18n.admin.inc --- i18n.admin.inc 3 Oct 2008 19:49:10 -0000 1.2.2.5 +++ i18n.admin.inc 7 Jan 2009 13:53:56 -0000 @@ -29,6 +29,19 @@ function i18n_admin_settings() { '#options' => _i18n_selection_mode(), '#description' => t('Determines which content to show depending on the current page language and the default language of the site.'), ); + + // Node translation links setting. + $form['links'] = array( + '#type' => 'fieldset', + '#title' => t('Content translation links'), + ); + $form['links']['i18n_hide_translation_links'] = array( + '#type' => 'checkbox', + '#title' => t('Hide content translation links'), + '#description' => t('Hide the links to translations in content body and teasers. If you choose this option, switching language will only be available from the language switcher block.'), + '#default_value' => variable_get('i18n_hide_translation_links', 0), + ); + return system_settings_form($form); } Index: i18n.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/i18n/i18n.module,v retrieving revision 1.41.2.24 diff -u -p -r1.41.2.24 i18n.module --- i18n.module 2 Jan 2009 18:03:21 -0000 1.41.2.24 +++ i18n.module 7 Jan 2009 13:53:56 -0000 @@ -217,6 +217,15 @@ function i18n_translation_link_alter(&$l function i18n_link_alter(&$links, $node) { global $language; + // Hide node translation links. + if (variable_get('i18n_hide_translation_links', 0) == 1) { + foreach ($links as $module => $link) { + if (strpos($module, 'node_translation') === 0) { + unset($links[$module]); + } + } + } + if (!empty($node->tnid)) { foreach (array_keys(i18n_language_list('extended')) as $langcode) { $index = 'node_translation_'. $langcode;