ngettext_with_context_{$domain}

过滤钩子
apply_filters( "ngettext_with_context_{$domain}", $translation, $single, $plural, $number, $context, $domain )
参数
  • (string) $translation Translated text.
    Required:
  • (string) $single The text to be used if the number is singular.
    Required:
  • (string) $plural The text to be used if the number is plural.
    Required:
  • (int) $number The number to compare against to use either the singular or plural form.
    Required:
  • (string) $context Context information for the translators.
    Required:
  • (string) $domain Text domain. Unique identifier for retrieving translated strings.
    Required:
定义位置
相关勾子
gettext_with_context_domainngettext_with_contextgettext_with_contextngettext_domaingettext_domain
相关方法
translate_with_contextget_the_content_feedget_the_contentget_edit_comment_linkget_next_comments_linktranslate_with_gettext_context
引入
5.5.0
弃用
-

ngettext_with_context_{$domain}与ngettext_with_context相似,但它也需要一个$domain参数来指定翻译的文本域。

使用域的gettext上下文过滤字符串的单数或复数形式。

钩子名称的动态部分$domain引用文本域。

$translation = apply_filters( "ngettext_with_context_{$domain}", $translation, $single, $plural, $number, $context, $domain );

常见问题

FAQs
查看更多 >