Returns the plural forms expression as a tuple.
Parameters
$header
stringrequired- Plural-Forms header string.
Source
protected function get_plural_expression_from_header( string $header ): string {
if ( preg_match( '/^\s*nplurals\s*=\s*(\d+)\s*;\s+plural\s*=\s*(.+)$/', $header, $matches ) ) {
return trim( $matches[2] );
}
return 'n != 1';
}
Changelog
Version | Description |
---|---|
6.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.