Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple languages #2

Open
timiwahalahti opened this issue Sep 6, 2024 · 2 comments
Open

Support for multiple languages #2

timiwahalahti opened this issue Sep 6, 2024 · 2 comments

Comments

@timiwahalahti
Copy link

Would be nice if Stemmer supported multiple languages on sites that have Polylang (or WPML) installed.

@msaari
Copy link
Owner

msaari commented Sep 9, 2024

Yes, I agree it would be nice. It may be possible with a filter function on pre_option_relevanssi_premium_snowball_stemmer_language: change the stemmer language on the fly to match the site language. Ready-made support for multiple languages would be better, though.

@msaari msaari changed the title Support for muliple languages Support for multiple languages Sep 9, 2024
@msaari
Copy link
Owner

msaari commented Nov 26, 2024

This seems to do the job:

add_filter( 'pre_option_relevanssi_premium_snowball_stemmer_language', function( $language ) {
    return relevanssi_get_current_language( false );
} );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants