MO (Machine Object) files: In the last step, the PO file is converted into a machine readable format.

Include the load_theme_textdomain Function

In order to prep your theme for localization, you need to include the following function in your theme’s functions.php file.

1
load_theme_textdomain( ‘yourtheme’, templatepath.’/languages’ );
Change “yourtheme” to the name of your theme and “templatepath” to the location in your themes folder where you want to save your translation files. I would recommend creating a “Languages” folder in your theme directory and saving your files there.

Localize Your Theme

This post is also available in: Anglais