International appeal: making your themes and plugins translatable
summary
WordPress powers about 43% of the web and over 55% of installs are non‑English, so make themes and plugins translatable by using gettext wrappers like __() and context/number variants, extracting a POT/PO/MO/JSON pipeline, and loading files with functions such as load_plugin_textdomain or the automatic repo delivery. Demo repo shows a tiny plugin with both PHP and JavaScript strings, and tooling options include CLI, grunt/gulp, Poedit, or the admin pot generator.
AI-written summary · about
chapters (13)
- 0:00Introduction and welcome
- 2:55Translation functions in code
- 5:00Why internationalization matters
- 8:12GNU gettext and text domains
- 10:42Translation process overview
- 13:15Specialized translation functions
- 16:54Generating POT files
- 20:33PO and MO files explained
- 21:36Loading translations in code
- 24:08Automatic translation handling
- 26:15Bespoke vs distributed themes
- 28:05Live demo and resources
- 29:30Further learning and Q&A
