Board index   FAQ   Search  
Register  Login
Board index PHP PHP Scripts

mutillingual directory switch button

Links for php scripts

Moderators: macek, egami, gesf

mutillingual directory switch button

Postby 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
micka8
New php-forum User
New php-forum User
 
Posts: 5
Joined: Sat Apr 05, 2003 2:44 am
Location: Paris

Postby Oleg Butuzov » 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.
Oleg Butuzov
Last Samuray
Last Samuray
 
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am


Return to PHP Scripts

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron