Forum Replies Created

Viewing 1 replies (of 1 total)
  • Forum: Plugins
    In reply to: Admin Language Switcher

    Here is a little patch to implement different languages for admin and content parts of blog.
    Just change file “wp-includes/l10n.php”
    Find function “get_locale” and make changes as shown below.

    function get_locale() {
    	global $locale;
    	if (isset($locale))
    		return apply_filters( 'locale', $locale );
    	// WPLANG is defined in wp-config.
    	if (defined('WPLANG'))
    		$locale = WPLANG;
    	if (empty($locale))
    		$locale = 'en_US';
    //!!!!Add this to function
    	if (is_admin())
    		$locale = 'en_US';
    //!!end of changes
    	return apply_filters('locale', $locale);
    }

    you can change $locale = ‘en_US’; to any language you want.
    And don’t forget to check this after every update. It can be rewritten automatically by wordpress

Viewing 1 replies (of 1 total)