gpt4 book ai didi

PHP 获取文本 : not all strings becomes translated

转载 作者:可可西里 更新时间:2023-11-01 12:57:14 25 4
gpt4 key购买 nike

我有这两行相邻的代码:

<td><?php echo __('Product', 'wpsc'); ?>:</td>
<td><?php echo __('Quantity', 'wpsc'); ?>:</td>

以及.po文件中的这些翻译

msgid "Product"   // Translates
msgstr "Produkt"

msgid "Quantity" // does not translate
msgstr "Antall"

一个字符串显示在网页上已翻译,另一个则没有。而且,是的,我已经尝试更改第一个翻译并确认翻译相应更改,所以我知道服务器读取了正确的 .mo 文件。这是在最新的 Ubuntu 服务器上。知道可能是什么问题吗?

最佳答案

作为Mark在他的评论中提到,检查 Quantity 定义上方的 #, fuzzy 行。 gettext 不会翻译模糊字符串。

( I'm adding this as an answer so it can get up voted, so that this question gets out of the unanswered queue )

关于PHP 获取文本 : not all strings becomes translated,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2677229/

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