Matt Read wrote:
> On Thu, Sep 4, 2008 at 11:23 AM, dh<[EMAIL PROTECTED]>  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.
>>      
>
> That could be that you did not set your plural function keywords
> correctly. in the main habari template (POT), for english, the
> keywords are:
>
> _n:1,2;_ne:1,2;_t;_e
>    
Yeah, thats right, i had to change that too.

I now use the following "Keywords" in POEdit:
"X-Poedit-KeywordsList: _n;_e;_t\n"

Ant as "Plural Forms" is use this:
"Plural-Forms: nplurals=2; plural=n > 1\n"

In the po file i do as follows:
#: xxx\habari\user\themes\lace/comments.php:9
msgid "Response to"
msgid_plural "Responses to"
msgstr[0] "Antwort zu"
msgstr[1] "Antworten zu"

(found this here: http://drupal.org/node/17564)

In the theme i use:
<?php echo $post->comments->moderated->count; ?> <?php echo _n('Response 
to', 'Responses to', $post->comments->moderated->count, 'lace'); ?>

That works quite well.

Thanks again for helping me out.

Btw.: Maybe in the next habari release we could add some example 
translation files for other languages. That should help ppl unterstand 
how this works... Or put this info in the wiki somewhere?

Greets,
dh

> Basically, says that the string being fed to the translation (which
> are english) have one sigular (first arg) and one plural (second arg).
> ie. _n:1,2
>
>    
>> 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...
>>      
>
> Yes. Seems you answered that though ;)
>
> >
>    


--~--~---------~--~----~------------~-------~--~----~
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