theme_locale
云策文档标注
概述
theme_locale 是一个 WordPress 过滤器,用于修改主题的区域设置(locale)。它允许开发者在运行时动态调整主题的语言环境,通常用于国际化或本地化场景。
关键要点
- 这是一个过滤器(filter),用于处理主题的区域设置字符串。
- 接受两个参数:$locale(当前区域设置)和 $domain(文本域标识符)。
- 从 WordPress 3.0.0 版本开始引入。
原文内容
Filters a theme’s locale.
Parameters
$localestring-
The theme’s current locale.
$domainstring-
Text domain. Unique identifier for retrieving translated strings.
Source
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |