2 Replies Latest reply on Feb 28, 2013 2:39 AM by mcollinge

    Closure template (soy) variables not always working with i18nText function


      This is a weird one; it works fine in some template alterations, but in this one, it's just outputting the i18n keyname.. I'm altering the behaviour of \soy\search\search.soy, so that the OpenSearch engine name (which corresponds to an i18n keyname) gets translated. However, when I alter this..


      <h2><a href="{$url}">{i18nText('search.results.os.view_more', $name)}</a></h2>


      ..to this.. (wrapping the engine $name with the i18nText helper function)...


      <h2><a href="{$url}">{i18nText('search.results.os.view_more', i18nText($name))}</a></h2>


      .. the i18nText function doesn't translate the name.


      Here's how it looks in the UI;




      It's most likely something to do with the fact that this code gets hit after the OpenSearch results are retrieved in an Ajax call, but if that's the case, then this is a bit of a limitation.


      Is there a trick to get this working?