如何使用包含子目录文件的所有文件的xgettext?

how to xgettext with all the file including subdirectories files? I tried to

xgettext -n *.php 

but it only generates *.po files in current directory without child directories' files. any option needed to recursively do the command?

Try this:

find . -name "*.php" >POTFILES
xgettext -n --files-from=POTFILES