Created
April 28, 2014 17:45
-
-
Save scarstens/11378999 to your computer and use it in GitHub Desktop.
Setup different languages for WordPress admin and front end
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// setup one language for admin and the other for theme | |
// must be called before load_theme_textdomain() | |
function set_my_locale($locale) { | |
$locale = ( is_admin() ) ? "en_US" : "it_IT"; | |
setlocale(LC_ALL, $local ); | |
return $locale; | |
} | |
add_filter( 'locale', 'set_my_locale' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment