How To Make Different Admin And Theme Languages

Hey folks!
WP-Snippet.com gave us a great solution, how to manage different language for dashboard and theme in WordPress.
But remember to delete language define in wp-config.php first!

<?php
// setup one language for admin and the other for theme
// must be called before load_theme_textdomain()

function set_my_locale($locale) {
$locale = ( is_admin() ) ? "en_US" : "it_IT";
setlocale(LC_ALL, $local );
return $locale;
}
add_filter( 'locale', 'set_my_locale' );
?>

Thanks again WP-Snippet.com !

Divi 2.0 WordPress Theme

Like what you read here in this blog post? If yes, please sign up and get latest articles delivered to your email account for FREE! You’ll be also subscribed to newsletter, where I share a exclusive content and offers.

About Kris Hoja

Hi! I'm Kris. For a while I was blogging about WordPress, now I'm owner of HogStudio - Creative Agency focused on website development.
Add me on Google+ and don't forget to follow me on Twitter :)

Leave a Reply