• Resolved iuliaradu

    (@iuliaradu)


    Hi,

    Hope all is well. Is there any chance you could help me with translating the first part from the drop down menu which says ‘All categorii de produse’?. This should actually be ‘Toate categoriile de produse’.

    Many thanks.

    Kind regards,
    iulia

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

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Eyal Fitoussi

    (@ninjew)

    Hello @iuliaradu,

    Try this script by adding it to the functions.php file of your theme:

    
    function gmw_custom_modify_taxonomy_default_value( $args, $tax, $gmw ) {
    
    	// Replace 1 with the form ID that you'd like to modify.
    	if ( 1 !== absint( $gmw['ID'] ) ) {
    		return $args;
    	}
    
    	// Change 'category' to the taxonomy you'd like to modify.
    	if ( 'category' !== $args['taxonomy'] ) {
    		return $args;
    	}
    
    	// Change 'some text' with the actual text that you'd like to use as the default option.
    	$args['show_option_all'] = 'Toate categoriile de produse';
    
    	return $args;
    }
    add_filter( 'gmw_search_form_dropdown_taxonomy_args', 'gmw_custom_modify_taxonomy_default_value', 50, 3 );
    
    Thread Starter iuliaradu

    (@iuliaradu)

    Hi,

    I have tried it several times and it is not working. Not sure why. I have also tried to do it via Loco Translate but it’s not working at all, I cannot find the string. ??

    Many thanks.

    Thread Starter iuliaradu

    (@iuliaradu)

    Hi,

    Could you still help me with this please?

    Thanks.

    Kind regards,
    iulia

    Thread Starter iuliaradu

    (@iuliaradu)

    HI @ninjew, could you you still please help me with this? The coding inserted did not work.

    Plugin Author Eyal Fitoussi

    (@ninjew)

    @iuliaradu,

    I just tested the script on my site and it works so I am not sure why it is not working for you.

    What is the ID of the form that you are trying to modify?

    Did you place the script in the functions.php file of your theme?

    Thread Starter iuliaradu

    (@iuliaradu)

    Hello,

    I tried again, in the functions php and it’s not working.

    ID is 1.

    Thank you.

    Thread Starter iuliaradu

    (@iuliaradu)

    @ninjew is there anything else to try? I even tried loco translate but I find to impossible to find the string for ”Al Categories”.

    Thank you.

    Plugin Author Eyal Fitoussi

    (@ninjew)

    @iuliaradu,

    I now realized that you are using a custom taxonomy and not the native category taxonomy.

    In the script you added to the functions.php file, please replace:

    
    if ( 'category' !== $args['taxonomy'] ) {
    

    with

    
    if ( 'product_cat' !== $args['taxonomy'] ) {
    

    Let me know if this works.

    Thread Starter iuliaradu

    (@iuliaradu)

    Yey! I worked! Thank you millions!!!

    Plugin Author Eyal Fitoussi

    (@ninjew)

    You are very welcome, @iuliaradu.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘translate a small’ is closed to new replies.