_nx

Definition:
function _nx($single, $plural, $number, $context, $domain = 'default') {}

A hybrid of _n() and _x(). It supports contexts and plurals.

Parameters

  • $single
  • $plural
  • $number
  • $context
  • $domain

Defined filters

  • ngettext_with_context
    apply_filters( 'ngettext_with_context', $translation, $single, $plural, $number, $context, $domain )

Source code

function _nx($single, $plural, $number, $context, $domain = 'default') {

	$translations = &get_translations_for_domain( $domain );

	$translation = $translations->translate_plural( $single, $plural, $number, $context );

	return apply_filters( 'ngettext_with_context', $translation, $single, $plural, $number, $context, $domain );

}

4345

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: