Configure Different Language for Frontend and Backend

If you want to configure a different language for the WordPress frontend and backend, you can use the snippet below:

 // must be called before load_theme_textdomain()

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