用Poedit创建POT文件 [英] Create POT file with Poedit
本文介绍了用Poedit创建POT文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正拼命尝试为php中的新应用程序创建目录(.in). 1)我创建了一个文件"trans.php",在其中放置了所有要翻译的值
I'm trying desperately to create a catalog (. In) for my new application in php. 1) I created a file "trans.php" where I put all the values to be translated
例如,这是我的文件:
<?php
echo _e('SORTIR LA NUIT');
?>
2)我打开Poedit,在路径"中输入的内容如下(见图) 然后,将文件"php"保存在同一位置.
2) I open Poedit, in the "Paths" here's what I entered (see photo) Then I save the same location of my file "php".
3)单击更新"时,出现以下错误:
3) When I click "update", I have the following errors:
12:25:43: No files found in: /Users/aweaoftheworld/Desktop/test
12:25:43: Poedit did not find any files in scanned directories.
12:25:43: Entries in the catalog are probably incorrect.
12:25:43: Updating the catalog failed. Click on 'More>>' for details.
你能帮我吗?
此致
推荐答案
例如,您应该使用 _ 代替 _e
you should use _ instead of _e, for example
<?php echo _("hi there i am gettext library") ?>
顺便说一句, _e 函数来自Wordpress引擎,它执行相同的操作,但不是PHP预定义函数.
by the way, _e function is from Wordpress engine, it doing same but it's not PHP predefined function.
这篇关于用Poedit创建POT文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文