gpt4 book ai didi

php - 使用 Poedit 创建 POT 文件

转载 作者:可可西里 更新时间:2023-11-01 13:03:48 24 4
gpt4 key购买 nike

我正在拼命地为我的 php 新应用程序创建一个目录 (.in)。1) 我创建了一个文件“trans.php”,我把所有要翻译的值都放在这里

例如,这是我的文件:

<?php 

echo _e('SORTIR LA NUIT');

?>

2) 我打开 Poedit,在“路径”中这是我输入的内容(见图)然后我保存我的文件“php”的相同位置。

paths configuration in Poedit

3) 当我点击“更新”时,出现以下错误:

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.

你能帮帮我吗?

此致

最佳答案

确保在 POEdit 中定义的路径(Catalog > Settings > Paths)指向包含您的 PHP 文件的文件夹。这应该可以解决 POEdit 找不到文件的问题。

如果在扫描的目录中未找到任何文件 得到解决,POEdit 可能仍会找到 0 条消息。这是因为默认情况下 POEdit 不支持 _e 作为关键字。要解决此问题,只需将“_e”添加到关键字列表(在 Catalog > Settings > Keywords 中)。

关于php - 使用 Poedit 创建 POT 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9095032/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com