Im trying to figure out the best method to have a multi language website that will function with seo friendly links.
The code that ive used many times before.....
Did you know?Explore Trending and Topic pages for more stories like this.
Code: $_SESSION['lang'] = $lang = (isset($_GET['lang']) ? mysql_real_escape_string(trim($_GET['lang'])) : (isset($_SESSION['lang']) ? $_SESSION['lang'] : 'en')); if (!function_exists("GetSQLValueString")) which i like as it refreshes the page that the viewer is on and pulls down info form the db with the correct extension i.e. about_en, about_it, about_de etc etc
The problem is when the user changes the language using with the follwing...
echo "<a href="?lang=fr">FR</a>"; the page refreshes but with '?lang=it' at the end of the address, therefore im 'presuming' the mod_rewrite will fail...