February 25, 2014 at 12:33 pm #228959
the AJAX-Search (location: main menu) displays two german terms below the input, when searching for a text-string which doesn’t exist. This happens in both versions of our website (standard: german / 2nd language: english). I think it is not a bug, so I kindly ask to give me some advice on how to solve that misbehaviour.
What I did, while trying to solve it on my own:
While earching for the strings which do not translate in the english version of our website, I found both translations in “themes\enfold\lang\de_DE.po”:
msgid “Sorry, no posts matched your criteria”
msgstr “Entschuldigung, aber kein Eintrag erfüllt ihre Suchkriterien”
on line 65/66.
msgid “Please try another search term”
msgstr “Bitte versuchen Sie einen anderen Suchbegriff”
I used the “import .po-file”-function, imported the above mentioned .po-file and selected both terms to add them to string translation.
The result was that I saw an existing english translation for both terms. I added the german translation for both terms, check “translation done” and saved.
But sadly this did not solve the still existing problem.
I hope I described my approach in an understandable way. And I am looking forward to get a hint on how to solve this issue.
Kind regards!February 26, 2014 at 4:36 am #229409
Are you using the latest version of Enfold (2.5.4)?
I tried reproducing your issue on my local install with no success:
JosueFebruary 26, 2014 at 11:04 am #229512February 27, 2014 at 10:25 am #229999
Unfortunately it’s a WPML bug and the plugin devs are apparently not going to fix it – see http://wpml.org/forums/topic/wpml-and-ajax-calls/. We now created a workaround which is not very user friendly but the only solution we can provide from our end and we added a filter which helps the user to translate the text. Copy the code I posted here: https://gist.github.com/InoPlugs/f6e551f9aaf5ff33a9c6 to your functions.php file and replace the language shortcodes (i.e. en or fr, etc.) with your language shortcodes. Then translate the text strings (“Sorry, no posts matched your criteria”, “Please try another search term”, etc.) for each language and save the functions.php file.
PeterMarch 2, 2014 at 10:49 pm #231314
The topic ‘AJAX Search – 2 Terms cannot be localized’ is closed to new replies.