View Full Version : links

02-06-2007, 02:58 AM
I have a site in 3 languages, each in its own folder so for example index.php, urlaub/index.php and reizen/index.php. I want a link on each that will direct to the different language. Here is my question is there away to use php to take the title of the page automatically and add the folder so the link would be the same for every page?
ie if i have a german flag on an english page,the link would be --urlaub+get page title.

02-06-2007, 06:13 AM
try echoing this to see if it suits your needs


02-21-2007, 05:28 AM
Ok by echoing that I got (on local server) villas/index.php so without trying live I can se it works (villas being the folder on my localhost)
the 2 links I am using now as an include is

<a href="/reizen/index_nl.php">
<img src="images/general/netherlands.gif" alt="netherlands" width="32" height="22" border="0" /></a>Nederlands<br />
<a href="/urlaub/index_de.php">
<img src="images/general/germany.gif" alt="Deutsch" width="32" height="22" border="0" /></a>Deutch<br />

I would rename both to index, all other translated files have the same name however I got stuck there. How do I make that a link?

02-21-2007, 06:04 AM
if you only have a couple of languages then i think your trying to overkill this

just hard code the path and page into the links

02-21-2007, 06:09 AM
is it that difficult then, or not possible? each language with 30 -40 villas with frequent changes so 180 - 240 links is what I was trying to avoid.

02-21-2007, 06:18 AM
cant do this automatically wether its PHP or HTML

your going to have to code the path dir