[vdr] Re: i18n done with gettext

Udo Richter udo_richter at gmx.de
Thu Nov 17 02:37:44 CET 2005


Lucian Muresan wrote:
>> How does this translate into gettext? Does each plugin use its own
>> textdomain(), and if, how does the domain switching happen?
> 
> I think so, every plugin should have it's own domain (therefore, po ->
> mo file). The switching would be done in the tr() macro (it's underlying
> function) when invoked with the plugin name argument

Just realized: There's a dgettext() that can be used instead of
temporarily switching the domain.

> If the translations are to be cached in memory, they would be read once
> at startup of VDR and each plugin, and a dynamically allocated Phrases[]
> array would be filled with their contents

Probably worth to investigate whether that is really better. If gettext
has been implemented in a smart way, its probably much faster than the
current VDR i18n implementation. And pre-loading all strings may also
add to the VDR startup time.

Cheers,

Udo




More information about the vdr mailing list