• Hello,

    Today I found that the widget it’s in english again and have a “Search” button that I didn’t have before. Did you change the widget? Do I lost my customization? I can’t remmeber if I modified as I’m using the plugin without errors for a few years until now.

    What I want to have it’s a Search box without a “Search” button.

    Thank you.

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter aitorserra

    (@aitorserra)

    I translated the strings here:

    $form = '
    	<div class="bsearch-form-container">
    		<form role="search" ' . $aria_label . 'method="get" class="bsearchform" action="' . esc_url( home_url( '/' ) ) . '">
    			<div class="bsearch-form-search-field">
    				<span class="screen-reader-text">' . _x( 'Search for:', 'label', 'better-search' ) . '</span>
    				<input type="search" class="bsearch-field search-field" placeholder="' . esc_attr_x( 'Buscar &hellip;', 'placeholder', 'better-search' ) . '" value="' . $search_query . '" name="s" />
    			</div>
    			' . $select . '
    			<input type="submit" class="bsearch-submit searchsubmit search-submit" value="' . esc_attr_x( 'Buscar', 'submit button', 'better-search' ) . '" />
    		</form>
    	</div>
    	';

    How can I remove the search button? Thank you.

    Plugin Author Ajay

    (@ajay)

    @aitorserra

    You can set the below CSS in the custom styles box.

    .searchsubmit { display:none }

    With respect to the translations, have you created a custom translation file? Also, if you have the time it might be worth checking out https://translate.www.ads-software.com/projects/wp-plugins/better-search/ where a translation file can be created for all Spanish users.

    audunmb

    (@audunmb)

    Why not just use the “search” term from WordPress for the front end? While translating the whole plugin is nice, “search” is a basic term and we don’t need a whole translation file for that.
    As most wordpress admins know English, we don’t really need to have everything translated, but the front end should be in the prefered language for our site.

    __( 'Search' );

    without your own textdomain afterwards should work if I understand this correctly.

    Plugin Author Ajay

    (@ajay)

    @audunmb

    Have you been able to test this at your end where the word Search gets translated automatically in a different language if the text domain is omitted. I only use English so haven’t tried it on other languages.

    Happy to make the change in the next version if this works.

    Plugin Author Ajay

    (@ajay)

    I should also add that the plugin provides a form, but doesn’t need to be used. I think WordPress has a simple search widget as well and most themes come with their own search bars.

    All of these work and you only need the Better Search widget if you want to also use the post types drop down and any future advanced changes that come with the plugin

    Tested it now, and by removing ‘better-search’ on line 209 in general-template.php, it shows the translated term on the button (“S?k” in Norwegian) instead.

    Plugin Author Ajay

    (@ajay)

    @audunmb

    Thank you for confirming. Does it also work for the other terms in those lines?

    Note: issue filed
    https://github.com/WebberZone/better-search/issues/77

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘New Widget? A button has appeared and I have lost the translation’ is closed to new replies.