Hi there.
I’m afraid the stripOutput ’solution’ I suggested earlier doesn’t actually work... and I can’t find a way to easily get it to work.
I have come up with a fairly simple idea for an alternative solution which should work with AJAX... but I haven’t succeeded in implementing it yet. I just get blank output instead of the multilingual template variable output. Perhaps coroico might have an idea what I am doing wrong? Could it be that I need to refer to the template variables with the tv234 style tv naming convention rather than using their full names?
My idea is as follows:
1. Add the [tt]&tvPhx=`tv:displayTV`[/tt] parameter to the snippet call. This should make the multilingual template variables available as placeholders. Something like [tt][+as.longtitle_en+][/tt], [tt][+as.description_en+][/tt], etc.
2. Create one [tt]ajaxResult_
langId[/tt] template chunk for each language, [tt]
langId[/tt]. In each template chunk, use placeholders which access the multilingual tvs for that language. Something like:
<div class="[+as.resultClass+]">
<a class="[+as.resultLinkClass+]" href="[+as.resultLink+]" title="[+as.longtitle_fr+]">[+as.pagetitle_fr+]</a>
[+as.description_frShow:is=`1`:then=`
<span class="[+as.description_frClass+]">[+as.tvDescription_fr+]</span>
`+]
[+as.extractShow:is=`1`:then=`
<div class="[+as.extractClass+]"><p>[+as.extract+]</p></div>
`+]
[+as.breadcrumbsShow:is=`1`:then=`
<span class="[+as.breadcrumbsClass+]">[+as.breadcrumbs+]</span>
`+]
</div>
3. Finally, instruct AjaxSearch to use the correct language result template by adding [tt]&tplAjaxResult=`ajaxResult_(lang_id)`[/tt] to the snippet call.
@MadeMyDay. If you don’t have success with this approach, then I am afraid that the only option is to fall back to non-ajax mode and have the result displayed on a separate page. In that case it is fine to replace the standard document variable placeholders like [+as.pagetitle+] with a YAMS snippet call like [[YAMS? &get=`data` &from=`pagetitle` &docid=`[+as.id+]`]].