• Resolved ivan2704

    (@ivan2704)


    Hi, I was wondering is there any way to localise just theme (TventyTen) to my language, without changing administration panel? I would like that admin panel stays in english.
    I downloaded localisation failes and uploaded them to my server, and when I change language in config file whole page is localised.
    I tried WP Native Dashboard plugin but it doesn’t work.
    Thanks 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    use this plugin: http://ww.wp.xz.cn/extend/plugins/admin-in-english/
    or put this in your theme’s functions.php:

    function admin_in_english_locale( $locale ) {
    	if ( is_admin() || false !== strpos($_SERVER['REQUEST_URI'], '/wp-includes/js/tinymce/tiny_mce_config.php')
    		|| false !== strpos($_SERVER['REQUEST_URI'], '/wp-login.php' ) ) {
    		return 'en_US';
    	}
    	return $locale;
    }
    add_filter( 'locale', 'admin_in_english_locale' );

    Thread Starter ivan2704

    (@ivan2704)

    Thanks, it works perfectly 🙂

    Can someone please help me and tell me why pasting this to my theme’s functions.php does NOT work? Admin still shows in local language instead of en_US 🙁

    PS: Running WP 3.3

    Thread Starter ivan2704

    (@ivan2704)

    Don’t know. Try installing pugin mentioned above, I used it before on WP 3.1 or 3.2 and it worked. Now I use local lang for whole page

    Plugin works… pasting same code to functions.php doesn’t.
    Any insight into why this is would be awesome.

    PS: Reason I ask is because I need a custom version of that code for my specific needs, and am trying to cut down on the number of plugins (that only do a tiny thing really).

    Thread Starter ivan2704

    (@ivan2704)

    I didn’t tried to paste that code in functions.php (or maybe I did, i don’t remember), but I also had a problem when I thied to paste code that makes widget. It worked, as plugin, but didn’t work inside functions.php

    Moderator keesiemeijer

    (@keesiemeijer)

    Use the plugin if it works. It’s not that much code for a plugin.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Theme localisation without changing admin panel language’ is closed to new replies.