GETTEXT (not really a question)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • evanescent.lurker@gmail.com

    GETTEXT (not really a question)

    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 --

  • Shelly

    #2
    Re: GETTEXT (not really a question)

    <evanescent.lur ker@gmail.com> wrote in message
    news:1121302869 .049318.91170@g 47g2000cwa.goog legroups.com...[color=blue]
    > 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 --
    >[/color]

    I have a thing against duplication. (That's why they invented include files
    :-) ). Your second choice means that if you find a bug somewhere, it has to
    be fixed in every subdirectory rather than just once.

    Shelly


    Comment

    Working...