WP_Textdomain_Registry::get( string $domain, string $locale ): string|false

In this article

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

Parameters

$domainstringrequired
Text domain.
$localestringrequired
Locale.

Return

string|false Languages directory path or false if there is none available.

Source

public function get( $domain, $locale ) {
	$path = $this->all[ $domain ][ $locale ] ?? $this->get_path_from_lang_dir( $domain, $locale );

	/**
	 * Filters the determined languages directory path for a specific domain and locale.
	 *
	 * @since 6.6.0
	 *
	 * @param string|false $path   Languages directory path for the given domain and locale.
	 * @param string       $domain Text domain.
	 * @param string       $locale Locale.
	 */
	return apply_filters( 'lang_dir_for_domain', $path, $domain, $locale );
}

Hooks

apply_filters( ‘lang_dir_for_domain’, string|false $path, string $domain, string $locale )

Filters the determined languages directory path for a specific domain and locale.

Changelog

VersionDescription
6.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.