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引用文字域。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$translation = apply_filters( "ngettext_with_context_{$domain}", $translation, $single, $plural, $number, $context, $domain );
$translation = apply_filters( "ngettext_with_context_{$domain}", $translation, $single, $plural, $number, $context, $domain );
$translation = apply_filters( "ngettext_with_context_{$domain}", $translation, $single, $plural, $number, $context, $domain );

常見問題

FAQs
檢視更多 >