0 votes

uForumTimeDiff MultyLingual

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

 


Archived files

Documentation

Source code

Package owner

Amos Goshen

Amos Goshen

Amos has 23 karma points

Package Compatibility

This package is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
Version 8.18.x (untested)

You must login before you can report on package compatibility.

Previously reported to work on versions:

Package Information

  • Package owner: Amos Goshen
  • Created: 23/10/2010
  • Current version 1.0
  • License MIT
  • Downloads on Our: 586