For example, if a user is on “site.com/en/food/hamburger.php”, and they press the german icon, I need it to get the bit after the en, or de, and then take that information, and put it after the opposite (site.com/de)
With [B]$_SERVER['REQUEST_URI'][/B] I get [B]/en/food/hamburger.php[/B], then do the replacement as per above, and the result is [B]/de/food/hamburger.php[/B].
@leatesauthorJan 14.2012 — #I need a button, (German flag icon) that when clicked, it links to the same file, just in the /de/ directory. So for example, if I'm on www.site.com/en/directory/page.php, and I click the German flag icon, it gets the part of the URL after /en/, and puts it after www.site.com/de/, and takes the user there.