Skip to Content
WordPress® All-in-One For Dummies®
book

WordPress® All-in-One For Dummies®

by Lisa Sabin-Wilson, Cory Miller, Kevin Palmer, Andrea Rennick, Michael Torbert
April 2011
Beginner to intermediate content levelBeginner to intermediate
908 pages
22h 37m
English
For Dummies
Content preview from WordPress® All-in-One For Dummies®

Internationalizing or Localizing Your Plugin

WordPress users exist across the United States, Russia, Japan, Germany, and all points in between. Therefore, the next person to download and use your plugin may not speak the same language you do. So if you wrote and distributed your plugin in English, it may be useless to the next person to download it if he only speaks German. However, the WordPress software has internationalization built into it, which means it can be localized, or translated, into different languages.

image You aren't translating the file into different languages, unless you want to. Rather, you're providing a mechanism of support for people who will want to provide translation for your plugin through the creation of .mo (machine object) files (discussed later in this chapter). Many people in different countries create (and have created) .mo files for the translation of WordPress into different languages; by providing localization for your plugin, you're enabling them to translate your plugin text, as well. (If you're interested in translating WordPress into a different language, check out this resource page in the WordPress Codex at http://codex.wordpress.org/Translating_WordPress.)

Using GetText Functions for Text Strings

WordPress provides you with two main localization functions: __ and _e. These functions use the GetText translation utility installed on your Web ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

WordPress® 24-Hour Trainer

WordPress® 24-Hour Trainer

George Plumley
Gaming Hacks

Gaming Hacks

Simon Carless

Publisher Resources

ISBN: 9780470877012Purchase book