Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Wordpress add filter locale
if ( ! function_exists( 'wolf_set_lang' ) ) {
/**
* Set your language here
*
* The .pot file can be found in the languages/ folder of the parent theme
* http://help.wolfthemes.com/2013/11/translate-your-wordpress-theme/
*
* @param string $locale
* @return string
*/
function wolf_set_lang( $locale ) {
return 'fr_FR'; // this is your Locale Code see http://wpcentral.io/internationalization/
}
add_filter( 'locale', 'wolf_set_lang' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.