A
A
Andrey Khokhlov2015-02-08 20:37:58
WordPress
Andrey Khokhlov, 2015-02-08 20:37:58

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

3 answer(s)
A
Andrey Khokhlov, 2015-02-10
@andrhohlov

So far I have settled on this plugin: https://wordpress.org/plugins/loco-translate/

L
L0k1, 2015-02-08
@L0k1

what about plugins for wp - Cyr-To-Lat for example?

K
Ksenia Mikhailova, 2015-02-09
@arizona

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 question

Ask a Question

731 491 924 answers to any question