Hi and thank you very much for taking your time to help me. I haven´t been able to reply due to "you have reach the maximun amount of post for today"..
Im a very beginner at PHP so thanks for being patient. I have attached the language settings so you can understand better. This is the code that i have at the moment
<select onchange='window.location=$(this).val();'>
<?php foreach ($languages as $language) {
$selected = '';
// if this page isn't viewable (active) for the language, skip it
if ( !$page->viewable( $language ) ) continue;
// if language is current user's language, make it selected
if ( $user->language->id == $language->id )$selected = " selected=selected";
// determine the "local" URL for this language
$url = $page->localUrl( $language );
// output the option tag
echo "<option$selected value='$url'>
$language->language_icon
$language->title
</option>";
}
?>
</select>
I tried to implement your code but with no luck. Please help.. :)