将两个参数传递给GetText复数

时间:2014-02-19 06:30:08

标签: php gettext

根据GetText复数,它只接受1个参数作为值,我们可以根据值得到复数形式。但是,我遇到了一个需要传递两个参数并显示它的场景。 例如。

You can only compare %d items at a time. %d items were removed from the comparison

这里首先%d = 4 第二%d = 2。

我的复数形式是这样的。

msgid "%d Single"
msgid_plural "%d Multiple"
msgstr[0] "You can only compare %d products at a time. %d product was removed from the     comparison."
msgstr[1] "You can only compare %d products at a time. %d products were removed from the comparison."

我知道这种语法仅适用于1个参数。我怎样才能克服这种情况?有什么建议吗?

0 个答案:

没有答案