FirstServed Tech Blog - FirstServed and the Art of Server Tuning

Using xgettext to extract language strings from PHP

Extracting language strings from PHP is best done woth xgettext… in order you are using the _(”) function to specify your text fragments.

Afterwards on the server you must run the following command to create a translatable *.po file which then can be eidtied using programs like poEdit:

find . -iname ‘*.php’ -exec xgettext –keyword=_ -j -o messages.po {} \;

Leave a Reply

You must be logged in to post a comment.