Cawa
Cawa

Reputation: 1299

How to use xgettext how to parse directory?

in manual there are a option -D for parse directory but when i do `xgettext -D /home/cawa/www/zf2/' i have en error the input file is missing?

Upvotes: 6

Views: 5471

Answers (2)

macm
macm

Reputation: 2019

You could use this cmd to recursively get all files in a directory.

find . -iname "*.py" | xargs xgettext --from-code utf-8 -o messages.pot

Upvotes: 8

Cawa
Cawa

Reputation: 1299

The answer was

find /home/cawa/www/deploy/module/Nav/ -type f \( -name '*.php' -or -name '*.phtml' \)  -print > list
xgettext --files-from=list --language=PHP -j messages.po

Upvotes: 11

Related Questions