Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Setup different languages for WordPress admin and front end
// 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' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment