In PHP, I want to change the language (English, German, etc) of the site when clicking a button. Is this the right way to approach that problem?
<?php
$language;
if ($language == "en") {
include("headerEn.php");
} else {
include("header.php");
}
?>
<a href="index.php"><?php $language = "en"; ?>
<img src="images/language/languageNO.png"></a>
<a href="index.php"><?php $language = "no"; ?>
<img src="images/language/languageEN.png"></a>
What is the best way to change the language of the site and have it persist when the user returns?