I am trying to get my head around the translation of the search forms for my website based on the Shapely theme. See attached: what is your advice for making sure those strings can be translated (I am using Polylang). I guess I need to create a custom search form?
So I have installed the plugin “Polylang Theme Strings” and “Theme and plugin translation for Polylang (TTfP)”.
I could find and translate the string for the Search button, but the placeholder “type here” does not appear in the list of strings I can translate.
I have then created nl_NL.po and nl_NL.mo and provided a translation to the “Type here” string.
But after all this, the placeholder in the search form does not translate when switching language.
Thanks for your swift reply and advice.
I found a solution.
I copied the extra.php file in my child theme and therein I modified from esc_html__( ‘Type Here’, ‘shapely’ ) to e( ‘Type Here’, ‘shapely’ ).
This makes the string “Type here” visible in the list of strings I can translate.
Strange that for the button name, esc_attr_( ‘Search’, ‘shapely’ ) is making the string “Search” visible for translation…
Let me know if you have any comment on my solution.