Core Function
View Source on Trac ↗ wp_set_script_translations()
wp_set_script_translations( mixed $handle, mixed $domain = 'default', mixed $path = '' ) Sets translated strings for a script.
Parameters 1 required
| Name / Type | Description |
|---|---|
| $handle string | Script handle the textdomain will be attached to. Required |
| $domain string | Optional. Text domain. Default 'default'. |
| $path string | Optional. The full file path to the directory containing translation files. |
Return Value
(bool)
True if the text domain was successfully localized, false otherwise.
Function Information
Since Version
5.0.0
Source File
wp-includes/functions.wp-scripts.php
Advertisement