Forked from scarstens/wordpress.different-langauges.php
Last active
August 29, 2015 14:24
-
-
Save fovoc/fdbf152673c2fc6c0570 to your computer and use it in GitHub Desktop.
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