首页 WordPress函数大全 load_script_textdomain()

load_script_textdomain()

2020-05-02 / 4248阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

load_script_textdomain( string $handle, string $domain = 'default', string $path = null )

加载脚本翻译的字符串。

描述

See also See also

  • WP_Scripts::set_translations()

Top ↑

参数

$handle

(string)
(Required)
Name of the script to register a translation domain to.

$domain

(string)
(Optional)
Text domain.

Default value: 'default'

$path

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

Default value: null

返回

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

大家谈论
    我的见解