什么是国际化
国际化(Internationalization)是插件开发的一个过程,使其可以轻松地翻译成其他语言。国际化通常缩写为i18n
(因为字母i和n之间有18个字母)。
为什么国际化很重要
WordPress在世界各地使用,在英语不是主要语言的国家。WordPress插件中的字符串需要以特殊的方式编码,以便可以轻松地翻译成其他语言。作为一名开发人员,您可能无法为所有用户提供本地化(意思是,需要对文本和其他东西进行修改,比如特定地区(地点)的数字格式)。但是,翻译可以成功地将插件本地化,而不需要修改源代码本身。
进一步阅读“如何国际化您的插件”。
资源
- Video: i18n: Preparing Your WordPress Theme for the World
- Video: On Internationalization: Plugins and themes for the whole world Slides
- Video: Big in Japan: A Guide for Themes and Internationalization
- Video: Lost in Translation—i18n and WordPress
- Internationalizing And Localizing Your WordPress Theme
- Internationalization: You’re probably doing it wrong
- More Internationalization Fun
- Use wp_localize_script, It Is Awesome
- Understanding _n_noop()
- Language Packs 101 – Prepwork
- Translating WordPress Plugins and Themes: Don’t Get Clever
- How to load theme and plugin translations
- Polyglots Handbook: Plugin/Theme Authors Guide