Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: ngettext_with_context

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
245  * A hybrid of _n() and _x(). It supports contexts and plurals.
246  *
247  * @see _n()
248  * @see _x()
249  *
250  */
251 function _nx($single, $plural, $number, $context, $domain = 'default') {
252      $translations = &get_translations_for_domain( $domain );
253      $translation = $translations->translate_plural( $single, $plural, $number, $context );
254      return apply_filters( 'ngettext_with_context', $translation, $single, $plural, $number, $context, $domain );
255 }
256
257 /**
258  * Register plural strings in POT file, but don't translate them.
259  *
260  * Used when you want do keep structures with translatable plural strings and
261  * use them later.
262  *
263  * Example: