Extracts headers from a PHP translation file.
Parameters
$php_file
stringrequired- Path to a
.l10n.php
file.
Source
foreach ( $headers as $po_header => $php_header ) {
if ( isset( $data[ $php_header ] ) ) {
$result[ $po_header ] = $data[ $php_header ];
}
}
return $result;
}
/**
* Displays or returns a Language selector.
*
* @since 4.0.0
* @since 4.3.0 Introduced the `echo` argument.
* @since 4.7.0 Introduced the `show_option_site_default` argument.
* @since 5.1.0 Introduced the `show_option_en_us` argument.
* @since 5.9.0 Introduced the `explicit_option_en_us` argument.
*
* @see get_available_languages()
* @see wp_get_available_translations()
*
* @param string|array $args {
* Optional. Array or string of arguments for outputting the language selector.
*
* @type string $id ID attribute of the select element. Default 'locale'.
Changelog
Version | Description |
---|---|
6.6.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.