Language files
Now that we have internationalized our code and prepared it for localization using the __() family of functions, it's time to create a POT file. POT stands for "portable object template", and the .pot file will store all of your translatable messages in one place. The POT file is what translators will typically use to translate your messages into a specific language and locale. It is called a template because it contains message IDs
. You may have thought that you were typing actual messages into your plugin, but take a moment to think of them as IDs. We are all familiar with this type of message ID—we see them all the time in error codes. For example, the copy machine might display "Error Code 7", or you may get a 404 message when ...
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.
Read now
Unlock full access