This snippet adds the notranslate class to the WordPress admin body to help prevent browsers like Google Chrome from automatically translating the admin dashboard. Useful for maintaining original text formatting and avoiding translation-related UI issues in the backend.
// Added notranslate class to disable the translate functionality of the browser
function sj_add_custom_admin_body_class( $classes ) {
$classes .= ' notranslate'; // Add your custom class here
return $classes;
}
add_filter( 'admin_body_class', 'sj_add_custom_admin_body_class' );