[MPlayer-dev-eng] I18n with .h files??

Nicolás Lichtmaier nick at technisys.com.ar
Sun Oct 14 07:13:03 CEST 2001


I've checked out mplayer from CVS and thought about translating it, 
but... .h files? Why doesn't mplayer use gettext? It's *much* better for 
the job.

This is why:

* Language gets choosen at runtime, according to the user setting of the 
LANG variable.
* Makes very easy for translators to keep translations up-to-date.
* Programmers don't need to work with ugly defines, they just work with 
the English messages, which are used as keys.
* It's very fast. It uses special GCC tricks (you-don't-need-to-know) to 
do each lookup just once, so if you have: for(....) { puts(_("some 
message"));} it's resolved just once. The second time there's not even a 
library call, just the message.
* It's LGPL (it changed recently) so it can be added without any license 
restrictions.

Sorry if this has been discussed before, but I have the most recent CVS 
version and the .h based translation is still there.... so if there were 
a discussion it ended the wrong way =).

If desired, I can convert the code to use gettext.

Please, CC me as I'm not sbscribed to the list.





More information about the MPlayer-dev-eng mailing list