Approach to internationalization
am 07.01.2008 21:26:48 von Hugh Oxford
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.
If it helps I am using Smarty for this project.
Re: Approach to internationalization
am 07.01.2008 22:24:23 von Courtney
Hugh Oxford wrote:
> Can anyone recommend an approach to internationalization?
Make them learn English?
>
> 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.
Sessions would allow you to invisbly carry a language variable..
>
> If it helps I am using Smarty for this project.
Re: Approach to internationalization
am 08.01.2008 00:36:07 von luiheidsgoeroe
On Mon, 07 Jan 2008 21:26:48 +0100, Hugh Oxford wrote:=
> Can anyone recommend an approach to internationalization?
>
> I am specifically concerned about the need to append an &lang=3Dxx to =
=
> every internal link and URL. I really don't want to have to manually d=
o =
> 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/function.output-add-rewrite-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