Gettext_Translations::set_header() WordPress Method

Gettext_Translations::set_header() is a Wordpress method used to set a header for a Gettext file. This is useful when you need to set a specific header, such as a charset or a textdomain, for a Gettext file.

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


Parameters

$header

(string)(Required)

$value

(string)(Required)


Top ↑

Source

File: wp-includes/pomo/translations.php

		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 );
			}
		}

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.