Re: RFP: externalize *all* locale-specific information

From: Christian Biesinger (cbiesinger@web.de)
Date: Tue Apr 30 2002 - 03:07:34 EDT

  • Next message: Andrew Dunbar: "Re: RFP: externalize *all* locale-specific information"

    Firstly, would it be possible to not CC me on mails to the list?

    On Tue, Apr 30, 2002 at 04:59:45AM +0100, Andrew Dunbar wrote:
    > --- Christian Biesinger <cbiesinger@web.de> wrote: >
    > > 1) With gettext, the en-US translation is always
    > > built in (well, needs not
    > > be en-US, but usually is)
    > > 2) on startup of a gettextized app, gettext is
    > > initialized with the
    > > language from an environment variable (note that I
    >
    > Note that this is not good enough for AbiWord. We
    > currently have a locale override in our profile so
    > we can support locales the OS doesn't.

    Hm, I am not sure if this can be done with gettext.
    This feature might be useful there:

           If the LANGUAGE environment variable is set to a nonempty value, and the locale is not the "C" locale, the value of
           LANGUAGE is assumed to contain a colon separated list of locale names. The functions will attempt to look up a transla­
           tion of msgid in each of the locales in turn. This is a GNU extension.

    > > don't know how this is
    > > done on windows - ie. maybe another approach is used
    >
    > On Windows we have our own code to map from Windows
    > locale to AbiWord locale (which is similar to but not
    > identical to Unix locale). On any OS we really need
    > to pass the locale we determine onto gettext.

    In general, it should be possible to do setlocale(LC_MESSAGES,
    "your_locale"), unless the approach above is used.

    -- 
    "They that can give up essential liberty to obtain a little temporary
    safety deserve neither liberty nor safety."
                                                     -- Benjamin Franklin
    




    This archive was generated by hypermail 2.1.4 : Tue Apr 30 2002 - 03:09:57 EDT