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.
- The topic ‘Different language for frontend and backend by tricking theme?’ is closed to new replies.