本文档介绍了 WordPress 国际化(i18n)的核心函数,包括基本翻译函数、转义函数、日期和数字函数,以及在 JavaScript 中可用的函数。开发者应参考国际化指南以了解每个函数的用途、用法和最佳实践。
Check the Internationalization Guidelines and learn what each i18n function is for, how to use them, and the best practices when writing your strings.
Strings that require translation and is used in attributes of html tags must be escaped.
Note: To be able to use these functions available in your javascript, you have to set up your plugin/theme javascript localization.