The problem
-------------------------------
If you are using the uForum package, you probably familiar with the function "uForum:TimeDiff($topic/created)" -
that outputs when a forum post has been published: "2 days ago", "3 weeks ago" etc.
if you are working only in English it works perfectly, but if you are
working in non-English site and you want to translate this message, you
are in a problem.
The solution
------------------------
Not
anymore!.. with this package, that installs one xslt macro, you can now
prints the TimeDiff message in any language (using dictionary items).
Usage
------------------------
All you need to do, is to import this xslt to your template and wrap the TimeDiff function with a new template:
<xsl:call-template name="time-ago">
<xsl:with-param name="timeDate" select="uForum:TimeDiff($topic/created)" />
</xsl:call-template>
and the message content will be changed according to the current culture and the dictionary items.
If you like it - please vote for it! ;) (in the top right corner of this page)
Best Regards,
Amos Goshen