[theme-reviewers] Translation-ready themes
otto at ottodestruct.com
Tue Jun 24 17:31:58 UTC 2014
I can see there is a lot of confusion here.
A POT file is a Portable Object Template. It's the file that you actually
start with. It's a generated text file containing all the strings from the
code. You can generate it in various ways, but the official recommended way
is to use the WordPress i18n tools. More on this below.
A PO file is what you get after running a POT file through a translation
system, like POEdit or GlotPress. It's the same as the POT file, but with
the translations for a specific language included.
A MO file is what you actually have to include with a piece of code for
people to immediately use those translations. It's the compiled version of
the PO file, for machines. Thus, instead of "Portable Object", it's a
"Machine Object" file.
Now, to generate POT files for a WordPress theme:
1. Check out the developer repository of WordPress:
svn co http://develop.svn.wordpress.org/trunk wordpress
2. In that developer directory, you'll find a /tools/i18n directory. So:
3. Use the makepot.php file:
php makepot.php wp-theme /path/to/your/theme/directory theme-slug.pot
The resulting POT file will be the file you need to give to translators, or
put into a GlotPress install, or whatever. It will have all the i18n
strings from your theme, as well as the strings from the style.css file for
the headers like the description and so forth. If you're doing a general
release, this POT file should be included with your theme.
If you have translated strings already, including the MO files will allow
the users of your theme to use those strings.
Including PO files is somewhat pointless, but they are generally included
along with MO files if you have pre-made translations.
On Tue, Jun 24, 2014 at 10:29 AM, Chip Bennett <chip at chipbennett.net> wrote:
> Is generation of a .POT file really as trivial as taking the
> Poedit-generated .PO file, and changing the extension from .PO to .POT?
> If so, I don't really see the criticality of requiring a .POT file over a
> .PO file.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the theme-reviewers