Hello,
I am using WPML. How do i translate “Search” text in dropdown field in main header (click on search icon). I can’t find it anywhere, is there an option in theme settings?
Site in private.
Hey Kauch_01,
Thank you for the inquiry.
To translate the placeholder text of the search bar, please add this filter to the functions.php file.
add_filter('avf_frontend_search_form_param', 'avf_frontend_search_form_param_mod', 10, 1 );
function avf_frontend_search_form_param_mod( array $params )
{
$params['placeholder'] = __('Iskanje...','avia_framework');
return $params;
}
Best regards,
Ismael
It doesn’t work
Hey,
Did you try translating the Search string using the WPML String Translation ( https://wpml.org/documentation/getting-started-guide/string-translation/ )?
Cheers!
Yigit
Yes i tried that – can you take a look (credentials in private) ?
Hi,
Thank you for the info.
The Appearance > Theme File Editor is not accessible from the dashboard, so we’re not able to edit the filter. The string is already translated in the String Translation editor.
Please edit the wp-config.php file and ensure that DISALLOW_FILE_EDIT is set to false or post the S/FTP details in the private field.
Best regards,
Ismael