• Resolved anskat

    (@anskat)


    Hi,
    in the search form, the placeholder text is not translated into the language of the theme . In my case : Italian. In the Search widget the text is: Search… and I would like: Cerca…
    I looked in the file “searchform.php” this code:

    <label class=”screen-reader-text” for=”s”><?php _e( ‘Search for:’, ‘sparkling’ ); ?></label>
    <input type=”text” class=”form-control search-query” placeholder=”<?php echo esc_attr_x( ‘Search for’, ‘placeholder’, ‘sparkling’ ); ?>” value=”<?php echo get_search_query(); ?>” name=”s” title=”<?php echo esc_attr_x( ‘Search for:’, ‘label’, ‘sparkling’ ); ?>” />

    How can I personalize it?
    Thanks
    Oscar

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi Oscar,

    I hope you are well today and thank you for your question.

    To translate it in the Italian language could you please refer the solution posted in the following reply for the french language translation?

    https://colorlib.com/wp/forums/topic/search-bar-translation/#post-33617

    Best Regards,
    Movin

    Thread Starter anskat

    (@anskat)

    Hi Movin,
    don’t work.
    This is the code in it_IT.po file:
    #: ../search.php:16
    #, php-format
    msgid “Search Results for: %s”
    msgstr “Risultato della ricerca per: %s”

    #: ../searchform.php:11
    msgid “Search for:”
    msgstr “Cerca…”

    #: ../searchform.php:12
    msgctxt “placeholder”
    msgid “Search…”
    msgstr “Cerca”

    #: ../searchform.php:12
    msgctxt “label”
    msgid “Search for:”
    msgstr “Cerca…”

    #: ../searchform.php:14
    msgctxt “submit button”
    msgid “Search”
    msgstr “Cerca”

    but placeholder is not translated

    Thread Starter anskat

    (@anskat)

    Hi Movin,
    I have downloaded Poedit (https://poedit.net/download) and I have correct the italian translation and compiled .mo file. Now the translation is correct.
    Best Regards,
    Oscar

    Hi Oscar,

    Awesome great to see you got that resolved.

    Please advise if you have more questions.

    Have a fantastic day!

    Cheers,
    Movin

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Customization placeholder widget Search’ is closed to new replies.