• It is possible to set the blog front end language to Traditional Chinese and the admin page keep using English?

Viewing 3 replies - 1 through 3 (of 3 total)
  • No guarantees, but this might work..

    add_action( 'admin_init', 'init_locale_change' );
    function init_locale_change() {
    	add_filter( 'plugin_locale' , 'switch_admin_locale' );
    }
    function switch_admin_locale( $locale ) {
    	$locale = 'en_US';
    	return $locale;
    }

    Should only switch the locale on the admin side.

    Hope that helps..

    Thread Starter hkdigit

    (@hkdigit)

    Thanks Mark / t31os, but can you kindly tell me which file apply this code?

    edit: *removed previous response*

    I’ve just realised this won’t work, this will only over-ride plugin language settings, looking at the lang functions now to see if i can find an appropriate filter/hook..

    edit:

    Try this instead.

    add_action( 'admin_init', 'init_locale_change' );
    function init_locale_change() {
    	add_filter( 'override_load_textdomain' , 'switch_admin_locale' );
    }
    function switch_admin_locale( $true_false ) {
    	return true;
    }

    Code can be placed into your theme’s functions.php file. It’s untested (i don’t run in any other language), so let me know the results… 😉

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Admin Page Languge’ is closed to new replies.