Custom links to switch language in Drupal 6 In my case, I wanted to print the language switch links directly in page.tpl.php, for example with:

&lt;a href="what_to_put_here"&gt;English&lt;/a&gt;
&lt;a href="what_to_put_here"&gt;Deutsch&lt;/a&gt;


How can I accomplish this without using the "Language switcher" block? I checked all the modules that comes with the Internationalization project, but I didn't see any hook_block() implementation that outputs the language switcher block.

UPDATED:
I wanted something like: This site is on russian, english and kazakh languages.
This cannot be done with language switcher block.

i've tried this way in page.tpl.php:

&lt;?php
$way = drupal_is_front_page() ? '&lt;front&gt;' : $_GET['q'];
print '&lt;span id="switcher"&gt;'. 'на ' . l('русском', $way). ', ' . l('казахском', 'kk/'.$way). ' и ' . l('английском', 'en/'.$way) .'&lt;/span&gt;';
?&gt;


Default language is russian - mysite.com, when i switch to an english - mysite.com/en, as you see it adds prefix 'en'. But now if i want to switch on kazakh language - mysite.com/kk from english the link looks mysite.com/en/kk == it adds en to my URL. How to make this correctly?
What doesn't work for you with the language switcher ?
If you want to reproduce its behavior, have a look at its code and try to do something equal.

Here is some code:

$path = drupal_is_front_page() ? '&lt;front&gt;' : $_GET['q'];
$languages = language_list('enabled');
$links = array();
foreach ($languages[1] as $language) {
  $links[$language-&gt;language] = array(
    'href' =&gt; $path, 
    'title' =&gt; $language-&gt;native, 
    'language' =&gt; $language, 
    'attributes' =&gt; array('class' =&gt; 'language-link'),
  );
}
drupal_alter('translation_link', $links, $path);
//dpm($links);

foreach ($links as $link) {
  echo t('Link for ') . l($link['title'], $link['href']) . '&lt;br /&gt;';
}