8/1/2023 0 Comments Poedit pluginIf you don’t have the pro version you can easily get the Blank POT and use that as the base of your POT file. If a mo was generated then you can delete that file as it is not needed. After generating the po file you can rename the file to POT. A pro version of it also features one-click scanning for WordPress plugins. The free Poedit default version supports manual scanning of all source code with Gettext functions. This is an open source tool for all major OS. You can also use Poedit locally when translating. Open command line and run the command like this: wp i18n make-pot path/to/your-plugin-directory Install WP-CLI and use the wp i18n make-pot command according to the documentation. There are a couple of ways to generate a POT file for your plugin: It is a good idea to offer the POT file along with your plugin/theme, so that translators won’t have to ask you specifically about it. The POT and PO files can easily be interchangeably renamed to change file types without issues. The POT file is the one you need to hand to translators, so that they can do their work. A text domain is a handle of each module, which has a different MO file. The conversion is done using the msgfmt tool. In general, an application may use more than one large logical translatable module and a different MO file accordingly. PO files), and are a “compiled” version of the PO file. These are machine-readable, binary files that the gettext functions actually use (they don’t care about. There is one PO file per language.įrom every translated PO file a MO file is built. The result is a PO file with the same format as a POT, but with translations and some specific headers. Here is an example POT file entry: #: plugin-name.php:123Įvery translator will take the POT file and translate the msgstr sections in their own language. This file contains the original strings (in English) in your plugin/theme. Top ↑ POT (Portable Object Template) files
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |