On this page
Gettext_Translations::set_header( string $header, string $value )
Parameters
$headerstring Required$valuestring Required
Source
File: wp-includes/pomo/translations.php. View all references
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 );
}
}
Related
Uses
| Uses | Description |
|---|---|
| Gettext_Translations::nplurals_and_expression_from_header() wp-includes/pomo/translations.php | |
| Gettext_Translations::make_plural_form_function() wp-includes/pomo/translations.php | Makes a function, which will return the right translation index, according to the plural forms header |
| Translations::set_header() wp-includes/pomo/translations.php | Sets $header PO header to $value |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/gettext_translations/set_header