Answer the question
In order to leave comments, you need to log in
What is the best way to make .pot (as well as po and mo) files for wordpress themes?
Actually a subject.
I started running a multilingual project on wordpress, I have the following experience and problems: I
use
- grunt-wp-i18n to generate a pot file
- Poedit to create / edit translations
After adding lines that require translation, I execute grunt makepot
, update the existing po files and add translations to them .
The plugin is great, does everything you need and how it should be done. But there is a problem: PHP CLI must be in your system path.
.
Since I use Open Server, I just run the console through it, there is already php and path there and everything works.
But it would be desirable not to depend on Open Server (Vagrant to master for example).
Installing php on Windows and a web server is still apparently - somehow quite melancholy.
I tried another plugin - grunt-pot - does not work, then Object true has no method 'indexOf'
, then an error of 2 lines of squares.
Answer the question
In order to leave comments, you need to log in
So far I have settled on this plugin: https://wordpress.org/plugins/loco-translate/
Poedit has a function "Update from source code" - and he himself searches in php files for translation lines
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question