My wordpress admin is in french.
and my theme is in arabic.
i have two files mo : arabic and french.
i used this :
add_filter( 'locale', 'change_locale' );
function change_locale(){ return 'pt_AR'; }
load_default_textdomain();
load_textdomain('responsive', get_template_directory().'/languages/pt_AR.mo');
i have my site web in araic only if i deleted the file french pt_FR.mo
if this file exit, my site web is will be in french not in arabic
how can fixed it ?!
Yes, rename your pt_AR.mo
to ar.mo
and pt_FR
to fr_FR.mo
.
In step one install but not activate yet the plugin Admin in English. Edit the plugin’s php script. Find line with en_US
string and replace this string with fr_FR
. Save and activate the plugin. Now your Dashboard will be in French.
In step two remove first three lines of your code from theme’s functions.php and replace fourth one with
load_theme_textdomain(‘responsive’, get_template_directory().’/languages’);.
In final step go to
Réglages -> Général` and select Arabic as your site’s language.
Now you should have your front end in Arabic and back end in French.