I'm trying to localize a 'C' project but I have no idea how to extract Strings by xgettext . And project has so many C files so extracting one by one is not feasible. S is it possible to extract strings from all files once. or there is any other way?
Thanks in advance
You can pipe all of your *.c files to the xgettext program using xargs assuming you're on Linux/Mac, e.g:
~$ find MyFolder -name "*.c \
| xargs xgettext --keyword=_ --language=C --output=messages.pot -
Be sure to pass - as the last parameter so it reads all files from stdin. Also you'll want to replace my simple keyword=_ example with the correct C function names.
From similar question in php, it is easy to know:
find . -iname "*.c" | xargs xgettext
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With