Gettext_Translations::set_header( string $header, string $value )

In this article

Sets translation headers.

Parameters

$headerstringrequired
$valuestringrequired

Source

public function set_header( $header, $value ) {
	parent::set_header( $header, $value );
	if ( 'Plural-Forms' === $header ) {
		list( $nplurals, $expression )     = $this->nplurals_and_expression_from_header( $this->get_header( 'Plural-Forms' ) );
		$this->_nplurals                   = $nplurals;
		$this->_gettext_select_plural_form = $this->make_plural_form_function( $nplurals, $expression );
	}
}

Changelog

VersionDescription
2.8.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.