The translator uses a POT file to translate available strings into a different language. The translated strings are saved as a portable object, or PO, file that’s human readable as well as a machine object, or MO file, that’s machine readable. Carrie demonstrates how to create each of these files using POEdit.
- [Voiceover] All right, with Poedit installed,…the next step is to actually open it up, let's do that.…And I'm gonna go ahead and launch Poedit.…Now if I go to the File menu, I've got several options here.…I can create a brand new file,…I can create a new translation…from an existing POT or PO File,…then we've got the New WordPress Translation option,…which would be totally awesome except for,…it requires the Poedit Pro upgrade,…and we don't want to do that.…I'm gonna show you how you can create…your POT file without it.…
So I'll go ahead and click the No, thanks button.…And we'll say File, New.…It's immediately gonna ask me what language I want…for the translation, and I want English, so I'll click OK.…From there, I'm gonna go to the Catalog, Properties window,…and there's a couple of things I want to check.…The first is the Source path.…It's letting me know that I need to save the file first…before I can edit this section,…so let's go ahead and do that.…I'm gonna save it to the languages folder in my plugin,…
- Why internationalization is important
- Using the gettext() function
- Adding context for translations
- Adding and loading text domains for WordPress themes and plugins
- Translating using GlotPress