Hello Matt,
forget my question. You were right, i have to use the domain in every
gettext function.
Greets,
dh
dh wrote:
> Hello Matt,
>
> ok, i just changed that and one error i got through the previous
> mentioned method has gone away.
> There Habari wouldn't translate the plural form for "comment /
> comments" via _n(xxx, yyy);
> That works now.
>
> Thanks again for helping me out guys!
>
> Btw.: is it really necessary to use the domain name in each gettext
> function? I currently don't use any domain-name there as a parameter
> and it works...
>
> Greets,
> dh
>
> Matt Read 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...
>>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---