[PHPTAL] i18n:domain Attribute
kornel at geekhood.net
Tue Jun 28 19:42:01 CEST 2011
On Tue, 28 Jun 2011 17:49:04 +0100, Darrell Hamilton <darrellh at 4over.com>
> There seems to be a lacking of any documentation for the i18n:domain
> attribute. In the current documentation, it is only mentioned as an
> aside in the PHPTAL_TranslationService section of the PHP Integration
>> From the doc comments in it's implementation:
> * The i18n:domain attribute is used to specify the domain to be used
> to get
> * the translation. If not specified, the translation services will
> use a
> * default domain. The value of the attribute is used directly; it is
> * a TALES expression.
Indeed. It's a wrapper for bindtextdomain(), which is a bit mysterious in
PHP documentation as well:
In practice it sets filename of .po/.mo file (domain "foo" would read
translations from "foo.mo").
If you're implementing your own translation service, you can use it for
whatever you want.
regards, Kornel Lesiński
More information about the PHPTAL