Re: improving i18n-to-gettext.pl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Freitag, 17. August 2007, Klaus Schmidinger wrote:
> On 08/15/07 15:07, Matthias Schwarzott wrote:
> > On Mittwoch, 15. August 2007, Klaus Schmidinger wrote:
> >
> > This will work, but only if the locale de_AT you set does exist (being in
> > output of locale -a).
> >
> >> but it came up with the default English texts. Then I renamed
> >> "de" to "de_AT" and did the same again, and I got the German texts.
> >>
> >> I was hoping that gettext would be a little more intelligent and
> >> look for
> >>
> >> - an exact match ("de_AT")
> >> - a default ("de")
> >> - any suitable language ("de_DE")
> >
> > I think it does this but not doing "any suitable language".
> > ...
>
> Could you please try the attached patch and see whether this
> works for you?
>
> This should, e.g., select any "de*" locale in case there is no fully
> matching one.
>
Not yet tested, but code looks promising.

Another way to get list of usable locales is this:
Checking the subdirs of /usr/lib/locale/
And then using all, that have associated mo file under vdr's LOCALEDIR.
Sadly I don't know if there is a better way than hardcoding that directory.

But "locale -a" command will give the same result - maybe analyzing its code 
will help (or just calling this external command).

Matthias

-- 
Matthias Schwarzott (zzam)

_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux