Translation(internationalization) with Wordpress
MO file is used for translation of internationalization by WordPress.
The basic translation files (extension is ‘.mo’) will exist in the following directory,
/wp-content/languages
".mo" file is a binary file.
its original text is ".po" file.
Usually, if you want to change the translation, you will edit ".po" file by text editor ( ex. memo ). And you will convert from ".po" file to ".mo" file.
You can use famous free convert tool ‘po editor‘.
Usage is very simple.
Open ". po" file (menu [File]-[Open]), and edit , and save ". po" file (menu [File]-[Save]).
When you save ". po" file, ".mo" file will be save by automated too.
Of course, ‘.mo’ file is saved that was converted to binary file from text file.
If you want to translate in the template(thema), you should edit like a following code.
|
|
Upper, 'Search' will be translated to locale language, and it will display by ‘echo’.
Bottom, 'Search' will be translated to locale language, and it will be returned. If you want to display its, you should edit ‘echo’.
You might also like:
Comments
One Response to “Translation(internationalization) with WordPress”
Leave a Reply
October 8th, 2014 @ 16:58:24
A good online alternative to the translation tool poedit is the online localization platform https://poeditor.com/
Use it ith this plugin to automate the process of translating .po files even more https://wordpress.org/plugins/poeditor/