2

I have installed the Localization module in my drupal project. All was working fine until now but i just noticed the "Translate" tab isn't visible for all my contents...

What i'm doing is simply :

-I go to content management -content -edit

-> Translate tab isn't visible...

On the other hand, when i try to translate another content of another content type, translate appears...

did anyone else face this problem previously? thanks in advance

1 Answer 1

2

The "Translate" tab is handled by the Translation module that comes with Drupal; the Internationalization module that handles the translation for nodes just overrides the page callback for that tab.

function i18n_node_menu_alter(&$items) {
  if (isset($items['node/%node/translate'])) {
    $items['node/%node/translate']['page callback'] = 'i18n_node_translation_overview';
    $items['node/%node/translate']['file'] = 'i18n_node.pages.inc';
    $items['node/%node/translate']['module'] = 'i18n_node';
  }
  // Take over node/add pages for string translation
  $items['node/add']['page callback'] =  'i18n_node_add_page';
  $items['node/add']['file'] = 'i18n_node.pages.inc';
  $items['node/add']['file path'] = drupal_get_path('module', 'i18n_node');
  // @TODO avoid iterating over every router path.
  foreach (node_type_get_types() as $type) {
    $path = 'node/add/' . str_replace('_', '-', $type->type);
    if (isset($items[$path])) {
      $items[$path]['title callback'] = 'i18n_node_type_name';
      $items[$path]['title arguments'] = array($type->type, $type->name);
    }
  }
}

In order to have that tab visible for a node, the multilingual support for the content type must be set to Enabled, with translation.

In Drupal 8, that is done in admin/structure/types/manage/<content type ID>, but the option is titled Enable translation. The route is defined from the Content Translation module, which must be installed.

screenshot

In Drupal 7, that is done in admin/structure/types/manage/<content type ID>.

screenshot

In Drupal 6, it is done in admin/content/node-type/<content type ID>.

screenshot

2
  • in my site enabled with translation is marked, and the translation tab is missing for some nodes. Any thoughts on that ?
    – Yama
    Commented Dec 19, 2015 at 12:26
  • maybe node language is Language neutral, try to set as English then Translate tab will appear
    – Permana
    Commented Jan 28, 2016 at 8:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.