In my case, I wanted to print the language switch links directly in page.tpl.php, for example with:
<a href="what_to_put_here">English</a> <a href="what_to_put_here">Deutsch</a>
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:
<?php $way = drupal_is_front_page() ? '<front>' : $_GET['q']; print '<span id="switcher">'. 'на ' . l('русском', $way). ', ' . l('казахском', 'kk/'.$way). ' и ' . l('английском', 'en/'.$way) .'</span>'; ?>
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?