theme_locale

过滤钩子
apply_filters( 'theme_locale', determine_locale()
参数
  • (string) $locale The theme's current locale.
    Required:
  • (string) $domain Text domain. Unique identifier for retrieving translated strings.
    Required:
定义位置
相关勾子
change_localeswitch_localedetermine_localelocalethemes_api
相关方法
get_localedetermine_localeget_user_localethemes_apiswitch_to_localeadd_theme_page
引入
3.0.0
弃用
-

theme_locale是一个WordPress的过滤钩子,它允许开发者修改主题所使用的地域。这可以用来改变主题所使用的语言,或者为主题添加额外的语言。

过滤一个主题的地区设置。

$locale = apply_filters( 'theme_locale', determine_locale(), $domain );

常见问题

FAQs
查看更多 >
闪电伯伯

(工作日 10:00 - 18:30 为您服务)

2025-11-17 23:27:14

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: