On Mon, 07 Jan 2008 21:26:48 +0100, Hugh Oxford <ar*****@fas.comwrote:
Can anyone recommend an approach to internationalization?
I am specifically concerned about the need to append an &lang=xx to
every internal link and URL. I really don't want to have to manually do
this if at all possible. Is there an approach anyone has taken to this
problem, perhaps some way of autogenerating the query string, or
avoiding it altogether.
I usually have pseudo URL's like:
example.eu/en/rest/of/path/
example.eu/de/rest/of/path/
example.eu/nl/rest/of/path/
example.eu/fr/rest/of/path/
... which will be examined by PHP itself. Requires a 'single point of
entry' system though, or use Apache mod_rewrite to alter it into a GET
variable.
Somewhat dirty, but a function which can make live easier, is this:
http://nl2.php.net/manual/en/functio...ewrite-var.php
Storing them in sessions as suggested is something I do, but don't rely
on. My sessions are not transparant, and I'd hate to have cookies being
required for 'open' pages (or inaccessable for searchbots for example).
--
Rik Wasmus