建立 gettext 產生的語言樣板( *.pot )

edited 十月 2013 in 進階PHP討論
因為還不是很熟悉,所以透過比較笨的方式:
find . -type f -iname "*.php" | xgettext -o test.pot -j -L PHP -f -
find . -type f -iname "*.inc" | xgettext -o test.pot -j -L PHP -f -

xgettext 會提示原始碼中語言檔有問題的地方,像是這樣:
./sales/customer_delivery.php:119: internationalized messages should not contain the ‘\r’ escape sequence
./sales/customer_invoice.php:118: internationalized messages should not contain the ‘\r’ escape sequence
./sales/inquiry/sales_deliveries_view.php:68: internationalized messages should not contain the ‘\r’ escape sequence

也許有朋友可以提供比較正式的用法 ;)

參考網址:
http://www.codelog.net/tips/playing-with-xgettext

原始討論: http://twpug.net/x/modules/newbb/viewtopic.php?topic_id=3377
Sign In or Register to comment.