Re: Localized messages and locale in GUI
Reimar Döffinger <[email protected]> Thu, 25 Feb 2021 09:13:50 +0100
| Newsgroups | gmane.comp.video.mplayer.devel |
|---|---|
| Message-ID | <[email protected]> |
> On 23 Feb 2021, at 23:57, Ingo Brückl <[email protected]> wrote: > > Reimar Döffinger wrote on Tue, 23 Feb 2021 22:28:59 +0100: > >> from what I remember the gettext API can be used "manually" specifying the >> locale instead of via setlocale, even if it's a bit more painful. > > I have never heard of this, do you have any further information? > > To my knowledge, gettext stops translating as soon as the locale is set to C. I never managed to find all the pieces, but in the source there is a reference to “libglocale” or such, and for that case it defines a gl_gettext function that takes the locale name as argument, and ignores whatever locale the C library is set to. There might be also other translation libraries that provide that kind of functionality without the weirdness of gettext, but I never found one that seemed really great. I think in the past, given that the system we already have, we considered whether we should just turn the MSGTR stuff into enums and use that to just get the translated strings via trivial array lookup, but it’s also not that great (and breaks the string format checking, though maybe that would be possible to still work around). _______________________________________________ MPlayer-dev-eng mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng