Question:
What is .mo file in wordpress?
Gerah Mae
2014-04-01 22:15:22 UTC
Good day! i had a wordpress site and i want it to be multilingual. i was just confused on what .mo file is .

answers are greatly appreciated. thanks in advance!
Three answers:
Edwin
2014-04-01 22:43:33 UTC
The GNU gettext utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages. MO files are meant to be read by machines and are in binary format. Unfortunately, there is no absolute standard for .MO files. MO files used by Gettext are more often given the extension .GMO to indicate they use the GNU format. The identifying characters used for this association are - Hex: DE 12 04 95
Stella
2014-04-02 00:17:12 UTC
Word press by default display U.S English language if you want to enable another language you can installing the .mo languages translation file in a language folder in wp-content.
?
2014-04-02 00:20:27 UTC
You can use this to create and edit those files:

http://www.poedit.net/download.php



The basic idea is to have a catalog of texts in multiple languages, and instead of using literal text in your code, you use a key.



pseudocode:

Instead of

Welcome to my Site!





you use something like





The function will get the full text assigned to the "welcome" key and display that, using the mo file of the current language.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...