WP_Textdomain_Registry::get()publicWP 6.1.0

Returns the languages directory path for a specific domain and locale.

Method of the class: WP_Textdomain_Registry{}

No Hooks.

Return

String|false. MO file path or false if there is none available.

Usage

$WP_Textdomain_Registry = new WP_Textdomain_Registry();
$WP_Textdomain_Registry->get( $domain, $locale );
$domain(string) (required)
Text domain.
$locale(string) (required)
Locale.

Changelog

Since 6.1.0 Introduced.

WP_Textdomain_Registry::get() code WP 6.1.1

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