Chi Kien Uong
Geranienstraße 30
71034 Böblingen
Deutschland / Germany
|
If you are not registered or logged in, you may still use these forums but with limited features.
Show recent topics
|
|
|
Author |
Message |
08/12/2002 23:16:42
|
R. Meier
Newbie
Joined: 10/11/2002 22:16:43
Messages: 1
Offline
|
Hi all
I'm completely a newbie in PHP. Because of an article here I tried to create the language.php site with the following code:
<?php
$referer = getenv("HTTP_REFERER");
if (empty($referer)) {
$target = "index.php";
}
if(!isset($lang)) {
$lang = "english";
}
SetCookie("lang", "$lang", time()+86400*365);
header("Location: $target");
exit();
?>
and a site called language.htm with the following code:
<body>
<a href="language.php?lang=english">English</a>
<a href="language.php?lang=german">German</a>
</body>
it never worked, the Guestbook is always shown in the default language I set by administration panel.
Is somebody there who can help me? Thank you very much.
BTW: I use the Advanced Guestbook v.2.2 (If I try the new version, I can not access anymore to the mySQL Database . I don't know why but if you have a solution for the v.2.2 I would be very happy)
Thank you very much
Ralf
|
|
17/12/2002 14:49:37
|
Anonymous
|
For english and german it may work with the following changes (guestbook 2.3.1 !!!):
(I show the previous 2 lines of code)
templates\success-php.htm (starts from line 1)
lib/vars.class.php (starts from line 35)
You can call the different languages through
http://xyz/guestbook/index.php?language=german
or
http://xyz/guestbook/index.php?language=german
My solution is not very nice as it seems that the guestbook does not autoconvert Umlauts to &xyz; neither stores it as unicode. So you will see some distortions if you switch to english encoding.
To the author(s) of Advanced Guestbook:
It would be really great if all languages could be shown properly! Are there any plans to implement this feature?[/b]
|
|
28/08/2004 13:22:56
|
Anonymous
|
I'm trying to use this for English/French but I didn't quite understand the code typed below. Could someone help?
|
|
|
|
|
|
Based on the open source JForum
|