Re: Multilingual web site
Posted: Sat Jun 17, 2006 12:47 am
Katon,
Thank you for the time you have spent on the multilang support.
I tested your new version and noticed that the flags linked to the current page if you do not use friendly urls. But if you turn on "assume_mod_rewrite" in config.php as I have done, then the flas always link to home.html instead of the current page.
In the file "plugins/function.lanselector.php" in the section following "if ($config["assume_mod_rewrite"])" it has "$url_parts = explode("/", $_SERVER['PHP_SELF']);" but that always resolves to "index.php" no matter what page the visitor is viewing.
That line show be "$url_parts = explode("/", $_SERVER['REQUEST_URI']);" which is the requested URL on the browser address bar and not the actual (php_self) page that gets pulled which is "index.php".
So, changing that one line to query "REQUEST_URI" instead of "PHP_SELF" fixes the problem.
Edward
Thank you for the time you have spent on the multilang support.
I tested your new version and noticed that the flags linked to the current page if you do not use friendly urls. But if you turn on "assume_mod_rewrite" in config.php as I have done, then the flas always link to home.html instead of the current page.
In the file "plugins/function.lanselector.php" in the section following "if ($config["assume_mod_rewrite"])" it has "$url_parts = explode("/", $_SERVER['PHP_SELF']);" but that always resolves to "index.php" no matter what page the visitor is viewing.
That line show be "$url_parts = explode("/", $_SERVER['REQUEST_URI']);" which is the requested URL on the browser address bar and not the actual (php_self) page that gets pulled which is "index.php".
So, changing that one line to query "REQUEST_URI" instead of "PHP_SELF" fixes the problem.
Edward