WordPress.org

Support

Support » How-To and Troubleshooting » Different language for frontend and backend by tricking theme?

Different language for frontend and backend by tricking theme?

  • I’d like to use different languages for my WordPress backend (admin interface) and frontend (theme).
    I know this has been discussed a few times, but I’m actually trying to “trick” the multi language enabled theme that I’m using to think that I’m using German in the backend, when in fact I’m using the standard, English installation.

    The theme uses the standard code for determining the language:

    load_theme_textdomain( 'evolve', get_template_directory() . '/languages' );
    	$locale = get_locale();
    	$locale_file = get_template_directory() . "/languages/$locale.php";
    	if ( is_readable( $locale_file ) )
    		require_once( $locale_file );

    I’ve replaced
    $locale = get_locale();
    with
    $locale = "de_DE";
    hoping that this would suffice to have the theme displayed in German whilst the backend remains in English.

    For some reason this isn’t working, both theme and backend continue to be in English.
    I’ve also noticed that the above code tries to access a PHP file in the theme’s languages folder, however there aren’t any PHP files, only the MO and PO files. I’ve noticed this with a number of themes now, is this normal?

    Thank you for your help.

Viewing 1 replies (of 1 total)
  • maurizio04
    Member

    @maurizio04

    Unfortunately lot’s of words are in the WP package, like dates…and there is not a way to not translate the dashboard…

Viewing 1 replies (of 1 total)
  • The topic ‘Different language for frontend and backend by tricking theme?’ is closed to new replies.