WP_Translation_Controller::get_files( string $textdomain = ‘default’, string $locale = null ): WP_Translation_File[]

In this article

Returns all translation files for a given text domain.

Parameters

$textdomainstringoptional
Text domain. Default 'default'.

Default:'default'

$localestringoptional
Locale. Default current locale.

Default:null

Return

WP_Translation_File[] List of translation files.

Source

protected function get_files( string $textdomain = 'default', string $locale = null ): array {
	if ( null === $locale ) {
		$locale = $this->current_locale;
	}

	return $this->loaded_translations[ $locale ][ $textdomain ] ?? array();
}

Changelog

VersionDescription
6.5.0Introduced.

User Contributed Notes

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