Page 1 of 1

Language "switch" button

Posted: Tue Sep 29, 2009 11:34 am
by Minus
Hello. I’m new to PHP and I have a little question.

I’m building a website with both ENGLISH and FRENCH side. Both sides are a "mirror" of each other. By that I mean that all the pages a placed at the same place. For example:

http://www.MySite.com/english/contact/index.html
http://www.MySite.com/french/contact/index.html


What I would like to achieved is to have a "French Version" or "English version" button, depending on the side you’re on. What I would like to do, if it’s possible, is to have the script check the current URL and simply replace the "/english" part by "/french" and vice versa, of the button’s link.

I currently use a JavaScript that does something like it; the problem is that the link cannot be seen by search engine.

Any idea?

Re: Language "switch" button

Posted: Tue Oct 27, 2009 3:28 pm
by akuji36
Take a look at this post--Php

may have an answer: _SERVER global variable:

http://coding.derkeiler.com/Archive/PHP ... 00915.html

thanks

Rod