Generate JSON files for language translation from po file without wp-cli i18n make-json
My plugin uses wp_set_script_translations()
to load translations for JS as mentioned here https://make.wordpress.org/core/2018/11/09/new-javascript-i18n-support-in-wordpress/.
I understand that when translations for a locale is added translate.wordpress.org it will create the JSON files.
But, we have a lot of site owners wants to translate a few words and start using the plugin.
They can create .po and .mo files, but how they can create the JSON files without setting up wp-cli to use (wp i18n make-json
).
Loco Translate plugin is not supporting JSON file generation.
I couldn’t find any online sites supporting .po to .json(with below mentioned format) conversion.
Out put file should in ${domain}-${locale}-${handle}.json
or ${domain}-${locale}-${md5}.json
JED 1.x ( .json ) file format for each JS file that called with wp_set_script_translations()
.
Leave an answer
You must login or register to add a new answer .