[wp-hackers] I18n for plugins
elfin at elfden.co.uk
Thu Feb 3 15:12:30 UTC 2011
# If your plugin is registered in the official repository, go to your
Admin page there and scroll to Generate POT file.
# If your plugin is not in the repository, you can checkout the
wordpress-i18n tools directory from SVN
So presumbably the built in POT generation uses those scripts?
I've been having some problems in my plugin and translators unable to
translate a call that used _n
sprintf(_n('<span>%d</span> product in cart.','<span>%d</span>
products in cart.',$eshopsize,'eshop'),$eshopsize);
Using Poedit, it wasn't keeping the plural form when I do an update.
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."
but does not add what I think to be a necessary header - ie.
"Plural-Forms: nplurals=2; plural=1;\n"
am I correct in thinking that that header should be in the POT file?
More information about the wp-hackers