[wp-hackers] text domain different from 'default'
ryan at boren.nu
Tue Apr 5 07:54:26 GMT 2005
On Tue, 2005-04-05 at 10:42 +0300, Nikolay Bachiyski wrote:
> Ryan Boren wrote:
> > On Tue, 2005-04-05 at 09:17 +0300, Nikolay Bachiyski wrote:
> >>Yesterday I started translating the internationalized default theme.
> >>However, when trying to deploy the .mo file I came across a serious
> >>problem. In order to add .mo file different from the default one I had
> >>to specify a different text domain under which the tranlation to be
> >>loaded. But when using another text domain all calls to the __()/_e()
> >>funcions should have the domain name as their second parameter. At first
> >>glance I cannot see an easy way to localize the kubrick theme (or any
> >>other theme/plugin) without adding a domain to the translation funcion
> > Yes. A domain is necessary. All themes and plugins that want to load
> > translations must specify a domain.
> OK, we will add domain parameter to __()/_() calls in the theme.
> However I see another problem. In many template functions there are
> internationalized strings. Any plugin or theme, which uses them will use
> the default domain translations, regardless of its will to use those
Indeed. Each domain has its own catalog. Some projects like to use
several domains in order to make string lookup faster since the lookup
is bounded by catalog. Separate domains are also useful when you want
to selectively load catalogs depending on context. I've considered
putting all admin strings in a separate domain/catalog so that we
wouldn't have to load them during regular blog page loads.
More information about the wp-hackers