• Resolved reghta

    (@reghta)


    Happy new year and thanks for the amazing plugin!

    We have diamond products that have carat size like 1.05 however in Turkish that is written as 1,05 (comma is used instead of dot). Is FiboSearch able to handle this?

    Currently this is not turning any results in the free version, even though the site has both the Turkish and English options. So I wonder whether a- can FiboSearch search across languages b- is the Fuzzy search feature in Pro able to handle this comma vs dot behavior?

    • This topic was modified 1 year, 11 months ago by reghta.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Kris

    (@c0nst)

    Hi @reghta

    Use this code snippet to replace a dot with a comma when the Turkish language is active.

    add_filter( 'dgwt/wcas/phrase', function( $keyword ) {
    
    	$is_tr_enabled = is_plugin_active( 'sitepress-multilingual-cms/sitepress.php' ) && apply_filters( 'wpml_language_is_active', NULL, 'tr' ) ? true : false;
    
    	if ( $is_tr_enabled ) {
    		$replace      = array(".");
    		$replace_with = array(",");
    		$keyword = str_ireplace( $replace, $replace_with, $keyword );
    	}
    
    	return $keyword;
    } );

    You have two ways to add this code to your theme:

    1. Open the functions.php in your child theme and add the code at the end.
    2. or install the Code Snippets plugin and apply this code as a snippet.

    Regards,
    Kris

    Thread Starter reghta

    (@reghta)

    Added as a code snippet and it works, thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Searching across dot and comma’ is closed to new replies.