Private Access Private Access

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness. Use _load_textdomain_just_in_time() instead.

Summery Summery

Gets the path to a translation file for loading a textdomain just in time.

Syntax Syntax

_get_path_to_translation( string $domain, bool $reset = false )

Description Description

Caches the retrieved results internally.

Parameters Parameters


(Required) Text domain. Unique identifier for retrieving translated strings.


(Optional) Whether to reset the internal cache. Used by the switch to locale functionality.

Default value: false

Return Return

(string|false) The path to the translation file or false if no translation file was found.

Source Source

File: wp-includes/l10n.php

	 * @param string       $domain The text domain.
	$file = apply_filters( 'load_script_translation_file', $file, $handle, $domain );

	if ( ! $file || ! is_readable( $file ) ) {
		return false;

	$translations = file_get_contents( $file );

	 * Filters script translations for the given file, script handle and text domain.


Changelog Changelog

Version Description
4.7.0 Introduced.

See also See also


Leave a Reply