Hey Jordan
You could use something like WPML out of the box which would do this kind of thing – its supported by this plugin.
Alternatively, yes you would be able to use pre_get_posts – but we must use a specific priority (copied and pasted from another thread):
function modify_search_filter_query( $query )
{
global $sf_form_data;
global $wp_query;
if ( $sf_form_data->is_valid_form() && $query->is_main_query() && !is_admin())
{
//we can add our modifications here:
$authorID = 1;
$query->set('author', implode(",", $authorID));
//not necessary but we can match the search form ID in case we are using multiple search forms
/*if($sf_form_data->form_id()==797)
{
}*/
}
}
add_action( 'pre_get_posts', 'modify_search_filter_query', 21 );
Thanks