[dev] Gettext strings in framework packages

Jan Schneider jan at horde.org
Mon Jan 25 09:38:45 UTC 2010


Zitat von Chuck Hagenbuch <chuck at horde.org>:

> Quoting Jan Schneider <jan at horde.org>:
>
>>> What if we kept the strings, but removed the gettext dependency?  
>>> We could still use gettext in Horde itself, building the catalogs  
>>> there? We could have a simple Horde_Translation framework that the  
>>> packages used to manage their strings, and build application-level  
>>> catalogs for more traditional Horde usage...
>>
>> We would lose one of the major benefits of using gettext if we did  
>> this, unless I misunderstood you. If we don't use gettext calls  
>> inside the code, all the gettext tools that extract strings from  
>> the files, and link strings in po files back to the source code,  
>> stop working.
>
> What about standardizing on a short shim function like t() or _t(),  
> and then passing that to xgettext's --keyword argument?

I still don't see using gettext a high barrier. It's easier for folks  
to create aliases for _() and ngettext() if they don't have gettext  
compiled in, than changing the whole toolchain and introducing yet  
another function wrapper. Where would that function go anyway, if  
everything is packaged in classes now?

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list