Set different languages in admin control panel and frontend site

Often I find myself building sites in different locals for different clients.
But if for instance the client wants a site for the Israeli clients, it does not mean that it would be comfortable for the owner to also manage the site in the same language in WordPress’s admin cp.

In WordPress there is still not a foolproof way of doing that without using WPML.
The solution I suggest is a bit hacky, but will do the job.

Open your wp-content/themes/{theme-name}/functions.php and add this function.