Available since: 2.6.2
searchwp_locale_override
View Parameters »SearchWP’s keyword stemming feature requires that the site locale be supported. The searchwp_locale_override
hook allows you to override this behavior.
You can override your site’s locale by adding something like this to your theme’s functions.php
:
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
<?php | |
// Override locale as far as SearchWP is concerned | |
add_filter( 'searchwp_locale_override', function( $locale ) { | |
return 'en_US'; | |
}); |
Parameters
Parameter | Type | Description |
---|---|---|
$locale |
String |
The actual site locale |