Skip to main content
Source Link

"Switch Language" block created by "Locale" module which is the most fundamental language handler in drupal. Its purpose it to switch user interface between languages. If translation exists for certain node it will used if not, only interface changes.

"Content Translation" module handles relations and links between translated nodes. The link you need is something like the language link/s that, by default, displayed inside node's links area.

I am not aware of existing module that display these node links in block. But you can display this list using code.

First, get can get an array needed links using translation_link() that supplied by "Content Translation" module

$node_translations = translation_link('node', $node_object);

Than, create HTML list out of that array, using theme_links(),

print theme('links', $node_translations, $attributes = array('class' => 'links langs more-classes-if-you-wish'));

To display this in block you can create new custom block with php input format or create template file for that block and make your code live there. To get node object in block you can use

  if (arg(0) == 'node' && is_numeric(arg(1))) {
   $node_object = node_load(arg(1));
  }
Post Made Community Wiki by israelshmueli