On 08/18/07 14:20, Matthias Schwarzott wrote:
> On Samstag, 18. August 2007, Klaus Schmidinger wrote:
>> On 08/18/07 13:10, Matthias Schwarzott wrote:
>>> The directory /usr/lib/locale does NOT contain any translations, but
>>> rather a directory for every locale you can set via setlocale.
>>> Its meant as a replacement of the setlocale loop.
>> I'm afraid I don't see what you mean.
>> I know that the "locale" directory doesn't contain translations directly,
>> but rather subdirectories. VDR gathers the names of these subdirectories
>> and does a setlocale() for each of them. Then it tries to get the
>> translation of "LanguageName$English" in order to build a list of all
>> available languages. How else do you suggest that could be done?
> First: general directory layout:
> /usr/share/locale/*/LC_MESSAGES/*.mo contains translations
> the oposite is /usr/lib/locale. This does NOT contain translations (and if
> insisit on the difference: nowhere in the subdirs are translations). There
> are just descriptions of the available locales.
Sorry, apparently we have a "lib" vs. "share" mixup here.
VDR searches in /usr/share/vdr/locale by default.
> You now do this:
> Loop over the subdirs of vdr-private-locale directory and then check which of
> these are actually available by doing setlocale.
> Now this can also be done by a check if there is some matching directory
> under /usr/lib/locale/.
But VDR needs to do the setlocale() call, anyway, because it needs
to know the language names and the three letter langauge code.
While the language name might even be derived otherwise, the
three letter language code sure can only be derived from a VDR
vdr mailing list