WordPress at a glance
function is not described

_WP_Dependency::set_translations() public WP 5.0.0

Sets the translation domain for this dependency.

{} It's a method of the class: _WP_Dependency{}

This is an internal function for using it by WP core itself. It's not recommended to use this function in your code.

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.

Changelog

Since 5.0.0 Introduced.

Code of _WP_Dependency::set_translations() WP 5.7

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