qTranslate admin language

None of the wordpress admin locale switcher plugins work, when you are using qTranslate and qTranslate does not have a separate option for admin locale, therefore to specify any other locale then the default content locale you’ll have to add the code below to qtranslate/qtranslate_hooks.php:

 * This filter hook allows wordpress admin locale to be
 * different then your default qTranslate content language
function qtrans_mofileFilter($mofile) {
	// replace "en_US" with your preferred admin language
	if (is_admin() || is_login())
		return WP_LANG_DIR."/en_US.mo";
	return $mofile;
add_filter('load_textdomain_mofile', 'qtrans_mofileFilter', 0);

function is_login() {
	return in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php'));

tested with WordPress version 3.2.1 and qTranslate version 2.5.24