I want to translate English to Arabic in wordpress (buddy press).

In php

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

In buddypress.pot

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

My problem is that message is not converting. If I remove %s it isworking fine. ie Dynamically creating a message is failing.

有帮助吗?

解决方案

In php we should call like this

$reason    = sprintf(__("Wave limit has been exceeded for today, you can wave  tomorrow %s","buddypress"),$user);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top