Localization: I want the backend: english and frontend in defined language
-
31-10-2019 - |
Question
I'd like to have the backend of Wordpress in English and use a different locale for the frontend
so far I figure out perhaps I could do it by setting in the wpconfig the locale I want to use in the frontend, then add in functions.php something like this:
add_filter('locale', 'mytheme_backendlocale');
function mytheme_backendlocale($locale) {
if ( is_admin() ) {
return 'en_US';
}
return $locale;
}
is this the best practice to achieve what I want or should I do it differently?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange