Tags
PHP , .po , .mo
Asked 6 years ago
20 Jun 2017
Views 2304
sandee

sandee posted

how to convert .po file .mo file by PHP ?

convert .po language file to .mo file By PHP , so it add extra lang constant on the fly without use any extra software like Poedit . so is there any way to comply .po file to .mo file
Mitul Dabhi

Mitul Dabhi
answered Nov 30 '-1 00:00

use Poedit

using PHP , dont know how to convert *.po files to *.mo files
Phpworker

Phpworker
answered Nov 30 '-1 00:00

Download
https://poedit.net/ install it

2. Download file from language folder
public_html/wp-content/languages
Or just file download ar.po file
And
Put the msg id and mgs text

Like suppose
“No posts found.” Text is there in the website and you want to translate to then put the “ar.po” at end of the file

msgid "No posts found."
msgstr "لا توجد مقالات."

3. Now open the ar.po file at poedit




4. Complie to .mo file



And you get. ar.mo file and upload at server
Post Answer