1. 首页
  2. WordPress 函数手册

load_script_translations()

load_script_translations( string|false $file, string $handle, string $domain )

加载给定脚本句柄和文本域的翻译数据。
Loads the translation data for the given script handle and text domain.

目录锚点:#参数#返回#源码


参数(Parameters)

参数 类型 必填 说明
$file (string | false) 必需 要加载的翻译文件的路径。如果没有就错了。
$handle (string) 必需 要向其注册翻译域的脚本的名称。
$domain (string) 必需 文本域。

返回(Return)

(string|false)给定脚本句柄和文本域的JSON编码转换string。如果没有,则为False。


源码(Source)


更新版本 源码位置 使用 被使用
5.0.2 wp-includes/l10n.php:1062 1 function 4

load_script_translations() 为WP2原创文章,链接:https://www.wp2.cn/functions/load_script_translations/