Hey Guys!
I must admit I'm fairly new to all this so I might be overlooking something completely or just not getting it
But here's what I want to do!
I'm building a website which I want to present in 3 languages. The user should be able to choose his or
her language via the use of a button. I created 3 image buttons that send a value to a php script at the bottom
of my page, but the page keeps rendering in the default language. Any ideas on what I am doing wrong, or
how you would go about achieving this? I would like the user(language) to stay the same as the chosen though
the buttons until it is changed again.
This is what I have so far :
<form action="" method="post">
<input type="text" name="taal" value="nl" style="display:none;">
<input type="image" src="../site/templates/img/vlag_nl.png" name="submit" />
</form>
<form action="" method="post">
<input type="text" name="taal" value="de" style="display:none;">
<input type="image" src="../site/templates/img/vlag_de.png" name="submit" />
</form>
<form action="" method="post">
<input type="text" name="taal" value="en" style="display:none;">
<input type="image" src="../site/templates/img/vlag_en.png" name="submit" />
</form>
<?PHP
if(isset($_POST["submit"])) {
$taal = $_REQUEST['taal'];
$user->language = $languages->get($taal);
echo $pages->LocalUrl($taal)->render();
};
?>
Any help would be much appreciated!
I've been spending waaay too much time on this piece of hocus pocus already
Gr,
Bram