Discover in this tutorial how to translate or change FacetWP autocomplete filter texts using code.
FacetWP is a fantastic plugin for filtering content. In fact, it’s the one I use on this page to make it easier to find tutorials.
By default, the filter that allows you to perform a search with autocomplete displays the texts in English. But you can translate or modify them using a little bit of code.
Let’s see how to do it:
Snippet to translate FacetWP autocomplete filter texts
Add the following code at the end of functions.php or in your functionality plugin:
To see this and another 1097 code snippets of this website, login or subscribe here.
In this code you use the gettext
filter in conjunction with the FaceWP domain to translate the 3 strings from the autocomplete filter to Spanish:
- Enter 3 or more characters
- Loading
- No results
You can use the literal translations of the example or modify them if you prefer.
Conclusion
Do you want to change the texts of the FacetWP autocomplete filter? Now you know how to do it.
Any questions? I read you in the comments.
And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉