• Resolved ladin

    (@ladin)


    Hi,

    I’d like to change language in a search form (word “Search…” and button “Search”). Where can I do it ? My search form is situated into Top panel (Top menu). Thanks a lot.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi ladin,

    usually the word Search in the search form is part of WordPress itself (your theme doesn’t seem to have a custom file searchform.php) and it usually will be translated after you’ve set your WordPress installation to your local language in your WordPress dashboard under Settings => General.

    Thread Starter ladin

    (@ladin)

    Hi MH Themes,

    unfortunately, my local language is right but search form is in English…Don’t you have another idea ? I will try to contact Czech support for WordPress.
    Thank you for your time.
    Ladin

    Hi all,
    all fo these strings are able to translate in Theme. So you need to add these files to this directory /wp-content/languages/themes

    Thread Starter ladin

    (@ladin)

    Ahoj Tomá?i ??

    I have saved into wp-content/languages/themes…and now ? I have still English there… ?

    Ladin

    If you are using some caching plugin, try to delete it. You can also try to delete browser’s cachce.

    If you use Wedos hosting you may be having caching enabled in your php by default – turn it off for a while.
    If it doesn’t hel try to reupload the .MO file to the directory written above.

    Thread Starter ladin

    (@ladin)

    Thank you but I will keep some English words, never mind. That’s too difficult and I don’t understand what you write about.
    L.

    Theme Author Richie KS

    (@rkcorp)

    copy paste this code to functions.php

    function wpdocs_my_search_form( $form ) {
        $form = '<form role="search" method="get" id="searchform" class="searchform" action="' . home_url( '/' ) . '" >
        <div><label class="screen-reader-text" for="s">' . __( 'Search for:' ) . '</label>
        <input type="text" value="' . get_search_query() . '" name="s" id="s" />
        <input type="submit" id="searchsubmit" value="'. esc_attr__( 'Search' ) .'" />
        </div>
        </form>';
    
        return $form;
    }
    add_filter( 'get_search_form', 'wpdocs_my_search_form' );

    edit the search button name.

    Thread Starter ladin

    (@ladin)

    Richie KS,
    thank you very much !
    L.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Search form – change language’ is closed to new replies.