Search the Community
Showing results for tags 'ajax multilingual'.
-
solved ajax, $pages->find, current language results
olafgleba posted a topic in Multi-Language Support
Hi, i only found posts with Ajax + Search topics, which does not help me with my question i am afraid. Within a form i narrow down the results to specific conditions (here: countries assigned to continents). While the first select (continents, s. Screen 1) is populated on page load, the second one gets filled up by a ajax call/response (form action attribute references to that ajax driven page). Works well. What i cannot figure out is why the ajax driven page does not consider the current language when quering pages ($pages->find()) within the ajax page (s. screen 2 (country names should be in english, not in german). As the ajax driven page is a regular PW template based page, i would expect that PW detects the language versions of the page fields automatically like on any other page. Without specifying something additionally. But obviously not. And i miss something or doing it wrong. Maybe helpful: The ajax page is a processwire page derived from a dedicated template. ProcessWire namespace is set (on the ajax driven page) All language checkboxes (Tab settings) in related pages are active Default language is german, both screens showing the page set to english. Thx in advance for any hint. cheers Olaf Screen 1: Screen 2: -
Does anybody know how to output AJAX response in multilingual site. On the home page I call another page which has if($config->ajax) {...} code. The response is always in the default language.