Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Search plugin (I18N)
(2020-05-12, 19:28:11)Alan-A Wrote: I'm using i18n and i18n search in my web-site and after after carrying out a search from either the search form or the tag cloud the page is loaded with a mixture of languages. This only happens when I call the search with my site's second language (English) active.

Hello,

Sorry, I glossed over this when you first posted – too complicated and in a hurry ... ;-)

Which browser are you using? With Firefox 77 (on Linux), I saw the effect that you describe, until I disabled Enhanced Tracking Protection in Firefox, for your site. Then it works as expected.

Testing in Chromium (Linux), it also works as expected.

After getting it working in Firefox, I can enable tracking protection again and it continues to work. I'm not able to clear the browser cache right now, so I can't check the effect of doing that.

So, it would appear to be a cookie-setting issue (guesswork).

You can ignore the PHP warning, or modify the file (path given in the warning that you posted), line 219, to:
Code:
'haschildren' => $showChildren ? count((array)$children) > 0 : self::hasChildren($childurl, $show)
--
Nick.
Reply
Hello Nick and many thanks for your reply.

I've been working with FF77 and FF mobile but have just tested with Vivaldi, Edge and IE11, all of which (on Windows) show the switching of languages. I've tried switching off Tracking Protection in FF but that didn't make a difference for me.

I'm not bothered about the PHP warning as that goes when I switch off debugging. I mentioned it as a possible relevant bit of information.

Best regards,
Alan
Web Developer and Translator (German > English)
Reply
Forget my last effort, it's the wrong direction.

This is wrong:
(2020-05-12, 19:28:11)Alan-A Wrote: The links in the tag cloud are rendered correctly - pointing to, for example:
- http://.../getsimple/suchergebnisse_en/?tags=translation

I think the search result link should always be http://.../getsimple/suchergebnisse/?tags= ... (i.e., without _en suffix). The display language is set internally and handled by I18N Search.

Manually select the language at the top of the page, which sends setlang=. Then paste a search into the browser address bar directly, e.g.:
Code:
http://www.alan-amos.de/suchergebnisse/?tags=content_management_system

(Tag 'content_management_system' is the only one with results in both English and German – make a couple of others if you want to test more widely.)

The results will follow the last language selection and all menus, form text and tag cloud are also in the last selected language, as required.
--
Nick.
Reply
(2020-06-11, 05:00:04)hameau Wrote: Forget my last effort, it's the wrong direction.

This is wrong:
(2020-05-12, 19:28:11)Alan-A Wrote: The links in the tag cloud are rendered correctly - pointing to, for example:
- http://.../getsimple/suchergebnisse_en/?tags=translation

I think the search result link should always be http://.../getsimple/suchergebnisse/?tags= ... (i.e., without _en suffix). The display language is set internally and handled by I18N Search.

... and it was that simple ......
Once more, many thanks - that was a make-or-break problem.
Web Developer and Translator (German > English)
Reply




Users browsing this thread: 1 Guest(s)