I'm trying to add two languages to my site, but I'm not sure, how to set up the URL for the language switch.
en.php and es.php contains separate languages:
$lang = array(
"home" => "Home",
"aboutus" => "About Us",
);
header.php contains include('lang-switch.php');, which successfully switches languages <h3><?php printTranslatedString('aboutus') ?></h3>
if I go to some page like localhost/user/site/doc1.php?title=blog by clicking the language switch link from site/includes/navbar.php with <a class="nav-link" href="&lang=en">En</a> and &lang=es.
The URL changes to localhost/user/site/&lang=en, or localhost/user/site/&lang=en Object not found.
I have to set up the URL with an update of doc1.php? document and title= name with &lang= name like: localhost/user/site/doc1.php?title=blog&lang=es
href="?xx".