【问题标题】:PoEdit doesn't recognize _n() pluralsPoEdit 不识别 _n() 复数
【发布时间】:2012-08-29 19:14:19
【问题描述】:

我在 POEdit 的源关键字中设置了这个:

_
__
_e
_ex
_n
esc_attr_e
_x
_nc

它有效,但是当我使用_n() 函数(二十一主题)时,我只得到第一个字符串:

<?php printf(_n('One Comment', '%s Comments', get_comments_number(), 'twentyeleven'), number_format_i18n(get_comments_number())); ?>

任何想法如何让它识别_n()?这正是我遇到的问题,但没有解决方案:http://www.poedit.net/trac/ticket/307

【问题讨论】:

    标签: php localization gettext poedit xgettext


    【解决方案1】:

    你应该在poedit中设置一个关键字,这样你就有了

    关键字

    n
    _n:1,2
    

    例如,这里是我的源关键字

    【讨论】:

      【解决方案2】:

      关键字规范在xgettext man page中有详尽的解释。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2013-01-12
        • 2012-04-06
        • 2010-11-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多