0

我想在 wordpress(伙伴新闻)中将英语翻译成阿拉伯语。

在php中

$reason        = __(sprintf("Wave limit has been exceeded for today, you can wave %s tomorrow",$user),"buddypress");

在buddypress.pot

#: wave
msgid "Wave limit has been exceeded for today, you can wave %s tomorrow"
msgstr "تم تجاوز الحد موجة لهذا اليوم، يمكنك موجة٪ S غدا"

我的问题是消息没有转换。如果我删除 %s 它工作正常。即动态创建消息失败。

4

1 回答 1

0

在php中我们应该这样调用

$reason    = sprintf(__("Wave limit has been exceeded for today, you can wave  tomorrow %s","buddypress"),$user);
于 2013-11-05T10:35:34.923 回答