How to use the @wordpress/i18n._nx function in @wordpress/i18n

To help you get started, we’ve selected a few @wordpress/i18n examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github johnbillion / query-monitor / output / html / theme.tsx View on Github external
{ Object.keys( parts ).map((filename)=>
								<li>
									{ parts[ filename ] }
									{ data.count_template_parts[ filename ] &gt; 1 &amp;&amp; (
										<span>
											<br>
											{sprintf(
												/* translators: %s: The number of times that a template part file was included in the page */
												_nx( 'Included %s time', 'Included %s times', data.count_template_parts[ filename ], 'template parts', 'query-monitor' ),
												data.count_template_parts[ filename ]
											)}
										</span>
									)}
								</li>
							)}
github devowlio / wp-react-starter / packages / utils / lib / factory / i18n.tsx View on Github external
function _nx(single: string, plural: string, count: number, context: string, ...args: any[]): string {
        return wpi18n.sprintf(wpi18n._nx(single, plural, count, context, slug), ...args) as string;
    }
github Automattic / wp-calypso / packages / jetpack-blocks / src / utils / i18n.js View on Github external
export function _nx() {
	return wpI18n_nx( ...addTextdomain( arguments ) );
}

@wordpress/i18n

WordPress internationalization (i18n) library.

GPL-2.0-or-later
Latest version published 1 day ago

Package Health Score

98 / 100
Full package analysis