I want to load my language files into the wordpress template. For this , I have created a folder called (languages) in the template root. Also I have generated the (*.po , *.mo) files for the language inside that directory.
I have added this code to the functions.php file :
load_theme_textdomain( 'mytheme', TEMPLATEPATH.'/languages');
$locale_file = TEMPLATEPATH."/languages/$locale.php";
if ( is_readable($locale_file) )
{
require_once($locale_file);
}
The name of my language files are (ar.po,ar.mo). So I have tried using this line :
_e("home","mytheme");
but nothing replaced , the text still as the same. What is the problem ?
I am not sure if this is the problem, but the language support must be enabled in
wp-config.php
too.Example:
Copied from here: