[wp-hackers] I18n for plugins

Rich Pedley elfin at elfden.co.uk
Thu Feb 3 22:40:57 UTC 2011


On 03/02/2011 17:09, Sergey Biryukov wrote:
> On Thu, Feb 3, 2011 at 6:12 PM, Rich Pedley<elfin at elfden.co.uk>  wrote:
>> Using the online one does include the correct plural:
>>
>> #: eshop-widget.php:44 eshop-widget.php:164 eshop-shortcodes.php:44
>> msgid "<span>%d</span>  product in cart."
>> msgid_plural "<span>%d</span>  products in cart."
>> msgstr[0] ""
>> msgstr[1] ""
>>
>> but does not add what I think to be a necessary header - ie.
>> "Plural-Forms: nplurals=2; plural=1;\n"
>>
>> (or similar)
>>
>> am I correct in thinking that that header should be in the POT file?
>
> It's not included in wordpress.pot, so I guess not.
>
> Plural-Forms header depends on the language, so it's up to translators
> to include the proper header when translating.

If I add that line it failed, if they add it via poedit GUI it worked. 
So thanks you were spot on.

Rich



More information about the wp-hackers mailing list