Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use xgettext how to parse directory?

Tags:

php

gettext

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?

like image 427
Cawa Avatar asked Dec 12 '22 22:12

Cawa


2 Answers

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
like image 191
Cawa Avatar answered Dec 29 '22 02:12

Cawa


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
like image 43
macm Avatar answered Dec 29 '22 03:12

macm