mutillingual directory switch button

Links for php scripts

Moderators: egami, macek, gesf

Post Reply
micka8

Sat Apr 12, 2003 2:33 am

Howdy!

Would someone know how I may allow a link to be clicked on so that a web visitor could either choose to display the page in English or French ?? (switching directories from adael.net/en/page1.htm to adael.net/fr/page1.html) ??

actually, the root directory read the French pages and the /en reads the English pages.

Hope I ll get a quick answer )
Thanks!
Mickael

Oleg Butuzov
Last Samuray
Last Samuray
Posts: 824
Joined: Sun Jun 02, 2002 3:09 am

Sat Apr 12, 2003 10:01 pm

index.php

if (isset($_COOKIE['lang'])){
if ($_COOKIE['lang'] == "fr")
{
header("Location: http://www.blah.com/fr/main.php")
}
if ($_COOKIE['lang'] == "en")
{
header("Location: http://www.blah.com/en/main.php")
}
} else {
header("Location: http://www.blah.com/en/main.php")
}

and on eache fr of en page set cookie with lang variable.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests