Translating WordPress – missing msgstr[] section
Published on by Karl Lindmark. 0 commentsI don’t quite know how often one actually does translate WordPress itself, or maybe a plugin/theme, but when you do… well, you kinda expect everything to go smoothly with poEdit and the given language files. Does it always? No.
When I tried to localize the the fix is pretty easy. Start by opening the language file with a text editor of your choice, and locate the following two rows:
msgid "One Response to %2$s" msgid_plural "%1$s Responses to %2$s"
At first, they do actually seem alright, but if you look around in the file, you’ll notice that every other string has a matching set of msgstr by it. Add the following two rows underneath the ones you see above (and poEdit should be able to generate a full-blown .mo-file upon saving):
msgstr[0] "" msgstr[1] ""
Last but not least – I’m pretty sure that this can be applied to any language file, regardless of intended platform or similar things. Hope someone out there finds this useful – I know I would’ve!