Hi gang,
I was thinking about further localization of my app.
There is a problem with gettext since it is not thread aware, but I
don't mind it, since if any other page changes the localization to its
liking, mine will change it again upon (re)loading, and everyone is
happy, as far as I'm concirned :)
The problem I'm facing now is this:
I'd like to translate as much of the site as I can, and I've created a
templating system for it. But which of the 2 systems would you prefer:
1.) Having one template file with the general design, and then if there
are a few picture headers, translate them through gettext, something
like:
@TMPL_MAIN_HEAD ER = _( 'pictures/header_en.png' );
and let it be translated through gettext to, for example,
'pictures/header_fr.png',
or
2.) Create a subdirectories in the template directories and duplicating
the design, changing only the pictures in it? Like:
templates/en/contact.tmpl
templates/fr/contact.tmpl
The first solution is quite easier, although gettext was probably not
intended to be used in that way :)
As I've said, it's not really a burning question, more like an
invitation to e-brainstorm :) So what do you think about it?
-- Evanescent Lurker --
I was thinking about further localization of my app.
There is a problem with gettext since it is not thread aware, but I
don't mind it, since if any other page changes the localization to its
liking, mine will change it again upon (re)loading, and everyone is
happy, as far as I'm concirned :)
The problem I'm facing now is this:
I'd like to translate as much of the site as I can, and I've created a
templating system for it. But which of the 2 systems would you prefer:
1.) Having one template file with the general design, and then if there
are a few picture headers, translate them through gettext, something
like:
@TMPL_MAIN_HEAD ER = _( 'pictures/header_en.png' );
and let it be translated through gettext to, for example,
'pictures/header_fr.png',
or
2.) Create a subdirectories in the template directories and duplicating
the design, changing only the pictures in it? Like:
templates/en/contact.tmpl
templates/fr/contact.tmpl
The first solution is quite easier, although gettext was probably not
intended to be used in that way :)
As I've said, it's not really a burning question, more like an
invitation to e-brainstorm :) So what do you think about it?
-- Evanescent Lurker --
Comment