Skip to content

Snippet: Change Front-End Site Language Without Changing Admin Language

function myprefix_live_site_locale( $locale ) {
    if ( ! is_admin() ) {
        return 'ru_RU'; // make front-end Russian
    }
    return $locale;
}
add_filter( 'locale', 'myprefix_live_site_locale' );
All PHP snippets should be added via child theme's functions.php file or via a plugin.
We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top