I need to be able to access different images for a bilingual website. I have stored the same named images into separate folders (en and fr) in order to change them based on the language the visitor selects. The code below allows me to switch the value from the default en to fr and then back to en, however from that point on, the value of $lang remains en. Any way to make it so that the en and fr ($lang and $lang2) values can be switched back and forth as many times as desired?
Code:
if (isset($_GET["lang"]))
{
$lang = $_GET["lang"];
$lang2 = "en";
}
else
{
$lang = "en";
$lang2 = "fr";
}