[英]Twig extract tranlations not working
我正在嘗試使用i18
擴展名提取PO文件。 按照本教程http://twig.sensiolabs.org/doc/extensions/i18n.html的操作,我嘗試翻譯我的網站。
問題是當我在終端中致電時嘗試提取譯文時:
root@debian:/var/www/html# xgettext --default-domain=messages -p ./locale --from-code=UTF-8 -n --omit-header -L PHP ./cache/*.php
xgettext: error while opening "./cache/*.php" for reading: No such file or directory
Checkig $ xgettext --help
我看不到-R
遞歸搜索
它正在嘗試調用"./cache/*.php"
但您的文件位於cache文件夾內的子文件夾中,因此應為"./cache/**/*.php"
。
我猜這個命令應該可以工作:
root@debian:/var/www/html# xgettext --default-domain=messages -p ./locale --from-code=UTF-8 -n --omit-header -L PHP ./cache/**/*.php
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.