![]() Steps on setting up grunt are beyond the scope of this documentation, but just be aware that it is possible. There are even some grunt tasks that you can use to create the POTs. Once you have placed the blank POT in the languages folder you can click “Update” in Poedit to update the POT file with your strings. If 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 OSs. ![]() You can also use Poedit locally when translating. 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: Note: It is a good idea to offer the POT file along with your plugin, 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. Top ↑ Generating the POT file # Generating the POT file A text domain is a handle of each module, which has a different MO file. The conversion is done using the msgfmt command line 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. Top ↑ MO (Machine Object) files # MO (Machine Object) filesį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. Top ↑ PO (Portable Object) files # PO (Portable Object) filesĮvery translator will take the POT file and translate the msgstr sections into their own language. This file contains the original strings (in English) in your plugin. Top ↑ POT (Portable Object Template) files # POT (Portable Object Template) files Top ↑ Localization files # Localization files Localization is often abbreviated as l10n (because there are 10 letters between the l and the n.) Localization describes the subsequent process of translating an internationalized plugin.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |