Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Gilles Faessler 29 posts 53 karma points
    Jul 29, 2011 @ 11:18
    Gilles Faessler

    Hi Dimitri,

    Your package looks very interesting for 1:1 multi-language umbraco sites. We are implementing a similar solution since a while using single documents but having multiple properties (one per language) and have to try your solution.

    I am just wondering how will your package perform when associated to xslt search package, how can you filter the results on a given language ?



  • dimi309 245 posts 579 karma points
    Jul 29, 2011 @ 15:22

    Hello Gilles,

    Thank you for your interest in this package!

    I have used the package together with xslt search once (this was before the package was converted to use the new xml schema; actually it was before this solution was even released as a package :) ). I did not filter the results because I noticed that the top results would usually be in the language preferred by the visitor performing the search anyway (they were the best match for the query).

    However, you could filter the results according to the selected language if you change the xsltsearch.xslt file a little bit. I don't know which version of xslt search you are using, but in version 2.8 (old xml schema), somewhere around line 131 there is a selection of nodes that can possibly appear in the results:

    <xsl:variable name="possibleNodes" select="$items/descendant-or-self::node[

    string(data [@alias='umbracoNaviHide']) != '1'

    and count(attribute::id)=1 

    and (umbraco.library:IsProtected(@id, @path) = false()

    or umbraco.library:HasAccess(@id, @path) = true())



    You could add a condition here (something like language=xx) and the filtering will take place accordingly.

    Using the Polyglot package, the returned urls for translation pages will be in the form "http:// s i t e / page / TranslationFolder / fr " for example, but, thanks to the Translation template associated with them (there is more info on this in the documentation of Polyglot) they will redirect to the basic page url, complete with the lang=xx parameter. Of course, to optimise things, you could modify the xsltsearch.xslt again to already convert the url before the results are returned, so that there is no redirection.

    I hope that this helps!


    Best regards,


  • Gilles Faessler 29 posts 53 karma points
    Aug 05, 2011 @ 13:52
    Gilles Faessler

    Hi Dimitri,

    Thanks for the hint for the xslt search, it looks definitely possible to filter the result by language quite easily.

    The translation template url looks interesting too, we will have to test your package.



Please Sign in or register to post replies

Write your reply to: