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

From: Andrew Dunbar (hippietrail@yahoo.com)
Date: Tue Apr 30 2002 - 03:20:57 EDT

  • Next message: Christian Biesinger: "Re: modest proposal -- use po, but not mo?"

     --- Christian Biesinger <cbiesinger@web.de> wrote: >
    Firstly, would it be possible to not CC me on mails
    > to the list?

    It's *very* hard to remember who needs to be CC'd
    and who dislikes it. I'm terrible with names and
    just hit "Reply All" to make sure it at least goes
    to the dev 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.

    Maybe we'll have to call setlocale() and do this.
    I really hate Unix's dumb way of doing locale via
    environment variables. Leads to all kinds of problems
    like this one. It should be possible to pass locale
    IDs as parameters to locale-aware functions but hey (:

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

    The problem is the OS doesn't necessarily support
    the locale as a whole. I'm not sure if this will be
    a problem or not. For example, our current system
    makes GUI strings possible in Welsh but if we do a
    setlocale() call, what will happen for dates,
    collation, etc?

    Andrew Dunbar.

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

    > ATTACHMENT part 2 application/pgp-signature
     

    =====
    http://linguaphile.sourceforge.net http://www.abisource.com

    __________________________________________________
    Do You Yahoo!?
    Everything you'll ever need on one web page
    from News and Sport to Email and Music Charts
    http://uk.my.yahoo.com



    This archive was generated by hypermail 2.1.4 : Tue Apr 30 2002 - 03:22:56 EDT