On this page
WP_Textdomain_Registry::get( string $domain, string $locale ): string|false
Returns the languages directory path for a specific domain and locale.
Parameters
$domainstring Required-
Text domain.
$localestring Required-
Locale.
Return
string|false MO file path or false if there is none available.
Source
File: wp-includes/class-wp-textdomain-registry.php. View all references
public function get( $domain, $locale ) {
if ( isset( $this->all[ $domain ][ $locale ] ) ) {
return $this->all[ $domain ][ $locale ];
}
return $this->get_path_from_lang_dir( $domain, $locale );
}
Related
Uses
| Uses | Description |
|---|---|
| WP_Textdomain_Registry::get_path_from_lang_dir() wp-includes/class-wp-textdomain-registry.php | Gets the path to the language directory for the current locale. |
Used By
| Used By | Description |
|---|---|
| _load_textdomain_just_in_time() wp-includes/l10n.php | Loads plugin and theme text domains just-in-time. |
Changelog
| Version | Description |
|---|---|
| 6.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_textdomain_registry/get