[MPlayer-dev-eng] [PATCH] localize with gettext (libintl)

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Wed Nov 29 23:50:21 CET 2006


Hello,
On Wed, Nov 29, 2006 at 11:17:23PM +0100, ?tv?s Attila wrote:
> Hi All.
> 
> mplayer-add:
> Makefile and genpo script:
> genarate ??.po from help_mp-??.h files
> build ??.mo from ??.po
> and
> install ??.mo to /usr/share/locale/??/LC_MESSAGES/mplayer.mo
> 
> 1-*:
> cosmetics help files
> 
> 2-*:
> modify Makefile, configure, mp_msg.c and mp_msg.h
> 
> New flag in configure:
> --enable-gettext
> 
> 3-*:
> applied gettext() to some files
> 
> Comment?

You cannot - I emphasize - you _can not_ use setlocale, it breaks the
behaviour of all kinds of C library functions, most notably strcasecmp,
in a way that e.g. causes crashes if the locale is tr_TR. In addition it is
not thread-safe, so that setting it every time you need it and restoring
it again is at least risk and quite likely to cause problems, too (yes,
indirectly through libavcodec even MPlayer uses threads!).

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list