O'Reilly logo

WordPress 2.8 Themes Cookbook by Lee Jordan, Nick Ohrn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Localizing your theme

WordPress themes are used by people all over the world. Luckily, it is relatively easy to localize your theme by modifying code. We will be adding localization functions to text strings, then creating a .po file, adding a tag within our theme so that WordPress knows the theme is localized, then optionally converting any translated .po files to .mo files, and changing the language setting of our theme. The GNU gettext localization system (also referred to as GetText) is used by WordPress to allow strings of text to be tagged as translatable and then looked up in a dictionary. GetText is available by default on all web servers.

How to do it…

Back up your theme files. In this recipe, we will be updating text seen on the administration ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required