Thanks, Matt. Now I know the proper way to use domains in plugins,
too.

Rick

On Sep 4, 11:15 am, "Matt Read" <[EMAIL PROTECTED]> wrote:
> On Thu, Sep 4, 2008 at 10:29 AM, rick c <[EMAIL PROTECTED]> wrote:
>
> > You're on the right track maintaining the same directory structure as
> > used for the main locales, but your translation file isn't being
> > loaded. I'm not sure if this will work, but you can try inserting the
> > following in the theme's theme.php file to load your translation file:
>
> > public function action_init_theme()
> > {
> >    Locale::load_pluggable_domain( 'habari',
> > Site::get_dir( 'theme' ) );
> > }
>
> Actually you should use:
>
> public function action_init_theme()
> {
>     $this->load_text_domain('lace');
>
> }
>
> Where 'lace' is the "text domain" of your theme. _Don't_ use 'habari'
> as the domain, as it could conflict Habari's own translations. So with
> a domain of 'lace', you should have:
>
> user\themes\lace\locale\de-de\LC_MESSAGES\lace.mo
>
> lace.mo is the domain; if your domain was 'foobar', it would be
> foobar.mo. Now call the gettext functions with the 'lace' domain.
> Like:
>
> _e('blah blah blarg', 'lace');
>
> Using a unique "text domain" will ensure that your theme does not
> conflict with Habari or other themes/plugins translations. Using a
> domain of 'habari' will work, but the recommended way is to use your
> own domain for reasons mentioned...
>
> --
> Matt Readhttp://mattread.com
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/habari-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to