WPDev.one
Core Function
View Source on Trac ↗

load_script_textdomain()

load_script_textdomain( mixed $handle, mixed $domain = 'default', mixed $path = '' )

Loads the script translated strings.

Parameters 1 required

Name / Type Description
$handle
string

Name of the script to register a translation domain to.

Required
$domain
string

Optional. Text domain. Default 'default'.

$path
string

Optional. The full file path to the directory containing translation files.

Return Value

((string)
(string | false) The translated strings in JSON encoding on success, false if the script textdomain could not be loaded.

Function Information

Since Version
5.0.0
Source File
wp-includes/l10n.php
Advertisement