Poedit and phtml files giving error from xgettext

Poedit Parse PHP

Problem

I had just set up a Poedit for a project at work and was trying to update the *.po file with new translations. It wasn’t finding a whole load of them.

After a while of poking around, it dawned on me that it was not looking in my phtml files. Simple enough, I just added *.phtml to the list of extensions in the parsers preference.

Then I receive a big long error message that xgettext didn’t know what phtml.

Solution

Add pthtml to your list of extensions

*.php;*.phtml

You also need to add ” -L php” to the end of your Parser command

xgettext --force-po -o %o %C %K %F -L php

Poedit Parse PHP


Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">