_WP_Dependency::set_translations()publicWP 5.0.0

Sets the translation domain for this dependency.

Method of the class: _WP_Dependency{}

No Hooks.

Return

true|false. False if $domain is not a string, true otherwise.

Usage

$_WP_Dependency = new _WP_Dependency();
$_WP_Dependency->set_translations( $domain, $path );
$domain(string) (required)
The translation textdomain.
$path(string)
The full file path to the directory containing translation files.
Default: ''

Changelog

Since 5.0.0 Introduced.

_WP_Dependency::set_translations() code WP 6.5.2

public function set_translations( $domain, $path = '' ) {
	if ( ! is_string( $domain ) ) {
		return false;
	}
	$this->textdomain        = $domain;
	$this->translations_path = $path;
	return true;
}