By dsp1 on
I know I should not modify the phptemplate.engine, but I did not know what to add to the template.php file and make it work. Could someone tell me how to put the code in the template.php? Is there a way to add one item to the $variable array?
This is what I did to get it to work.
In phptemplate.engine
find this code
$variables = array(
'base_path' I added to the end
'langlinks' => i18n_get_links($_GET['q'])
In modules>i18n>i18n.inc
I commented out lines 391 and 392. (idea taken from another post)
// $output .= $separator;
// $output .= l($text, $target, $attributes, NULL, NULL, FALSE, TRUE);
And in the page.tpl.php
add this code to where you want the flags to show.
print theme('links', $langlinks)
Any help in making this work in template.php would be appreciated.