Skip to content

Instantly share code, notes, and snippets.

@brutaldesign
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brutaldesign/3f07ddd084cfc9b46e64 to your computer and use it in GitHub Desktop.
Save brutaldesign/3f07ddd084cfc9b46e64 to your computer and use it in GitHub Desktop.
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