Sets a translation textdomain.
Parameters
$handle
stringrequired- Name of the script to register a translation domain to.
$domain
stringoptional- Text domain. Default
'default'
.Default:
'default'
$path
stringoptional- The full file path to the directory containing translation files.
Default:
''
Source
public function set_translations( $handle, $domain = 'default', $path = '' ) {
if ( ! isset( $this->registered[ $handle ] ) ) {
return false;
}
/** @var \_WP_Dependency $obj */
$obj = $this->registered[ $handle ];
if ( ! in_array( 'wp-i18n', $obj->deps, true ) ) {
$obj->deps[] = 'wp-i18n';
}
return $obj->set_translations( $domain, $path );
}
User Contributed Notes
You must log in before being able to contribute a note or feedback.