More localization wishlist



>>>>> "Mario" == Mario Rodriguez <biomates at telefonica.net> writes:

    Mario> El mar, 04-06-2013 a las 01:01 +0100, Rupert Swarbrick escribi?:
    >> Mario Rodriguez <biomates at telefonica.net> writes:
    >> > It seems the problem was introduced when the file intl.lisp was written
    >> > for the first time.
    >> >
    >> > In any case, function 'describe' speaks in Spanish again when (getenv
    >> > "LANG") is called before (getenv "LANGUAGE") in the 'or' statement:
    >> >
    >> >
    >> > (defun setlocale (&optional locale)
    >> >   (setf *locale* (or locale
    >> > 		     (getenv "LANG")
    >> > 		     (getenv "LC_ALL")
    >> > 		     (getenv "LC_MESSAGES")
    >> > 		     (getenv "LANGUAGE")
    >> > 		     *locale*)))
    >> 
    >> LANG being last follows at least the Gettext manual [1]. I confess that
    >> I don't play around with such things much (since I'm lucky and speak
    >> en_GB but don't mind en_US in moderation...). Why do you think that LANG
    >> should precede LANGUAGE?
    >> 
    >> Rupert
    >> 
    >> 
    >> [1] https://www.gnu.org/software/gettext/manual/html_node/Locale-Environment-Variables.html

But the next section on LANGUAGE says:

    GNU gettext gives preference to LANGUAGE over LC_ALL and LANG for
    the purpose of message handling, but you still need to have LANG
    (or LC_ALL) set to the primary language; this is required by other
    parts of the system libraries. For example, some Swedish users who
    would rather read translations in German than English for when
    Swedish is not available, set LANGUAGE to ?sv:de? while leaving
    LANG to ?sv_SE?.
    ...
    Note: The variable LANGUAGE is ignored if the locale is set to
    ?C?. In other words, you have to first enable localization, by
    setting LANG (or LC_ALL) to a value other than ?C?, before you can
    use a language priority list through the LANGUAGE variable.

I think this means we need to do a more complicated parsing of
LANGUAGE when setting the locale.

[snip]

    Mario> And quoting myself,
    Mario> "I'm not sure if this change breaks something else."

Probably not any worse than what we're doing now. :-)

Ray