[Plugin: Relevanssi – A Better Search] Making Relevanssi better at multilanguage
-
Hello.
I installed the plugin on a multilanguage site with qtranslate. The problem was that the results returned were displayed in both languages, as qtranslate saves multiple language versions in the field by encapsulating them in specialized tags. For example a title field would hold
<!--:lang1-->Lang1 title<!--:--><!--:lang2-->Lang2 title<!--:-->
.Now this is a creates a problem when activating Relevanssi with highlighting turned on as the titles are stripped of their tags before highlighting them, which outputs search results as “Lang1 titleLang2 title”, for the example above.
As simple fix for this would be to use the
__()
localization function.Transforming line
658
from:
$post->post_title = strip_tags($post->post_title);
to
$post->post_title = strip_tags(__($post->post_title));
would fix the problem.I hope you’ll consider adding this to the next update.
Thank you for all your hard work on this plugin!
- The topic ‘[Plugin: Relevanssi – A Better Search] Making Relevanssi better at multilanguage’ is closed to new replies.