<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -63,17 +63,17 @@
       var days = hours / 24;
       var years = days / 365;
 
-      var words = seconds &lt; 45 &amp;&amp; sprintf($l.seconds, Math.round(seconds)) ||
+      var words = seconds &lt; 45 &amp;&amp; substitute($l.seconds, Math.round(seconds)) ||
         seconds &lt; 90 &amp;&amp; $l.minute ||
-        minutes &lt; 45 &amp;&amp; sprintf($l.minutes, Math.round(minutes)) ||
+        minutes &lt; 45 &amp;&amp; substitute($l.minutes, Math.round(minutes)) ||
         minutes &lt; 90 &amp;&amp; $l.hour ||
-        hours &lt; 24 &amp;&amp; sprintf($l.hours, Math.round(hours)) ||
+        hours &lt; 24 &amp;&amp; substitute($l.hours, Math.round(hours)) ||
         hours &lt; 48 &amp;&amp; $l.day ||
-        days &lt; 30 &amp;&amp; sprintf($l.days, Math.floor(days)) ||
+        days &lt; 30 &amp;&amp; substitute($l.days, Math.floor(days)) ||
         days &lt; 60 &amp;&amp; $l.month ||
-        days &lt; 365 &amp;&amp; sprintf($l.months, Math.floor(days / 30)) ||
+        days &lt; 365 &amp;&amp; substitute($l.months, Math.floor(days / 30)) ||
         years &lt; 2 &amp;&amp; $l.year ||
-        sprintf($l.years, Math.floor(years));
+        substitute($l.years, Math.floor(years));
 
       return $.trim([prefix, words, suffix].join(&quot; &quot;));
     },
@@ -113,8 +113,8 @@
     return (new Date().getTime() - date.getTime());
   }
 
-  // lame sprintf implementation
-  function sprintf(string, value) {
+  function substitute(stringOrFunction, value) {
+    var string = $.isFunction(stringOrFunction) ? stringOrFunction(value) : stringOrFunction;
     return string.replace(/%d/i, value);
   }
 </diff>
      <filename>jquery.timeago.js</filename>
    </modified>
    <modified>
      <diff>@@ -9,21 +9,9 @@
   &lt;script src=&quot;test.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
   &lt;script type=&quot;text/javascript&quot;&gt;
     jQuery.timeago.settings.allowFuture = true;
-    // jQuery.timeago.settings.strings = {
-    //    ago: &quot;geleden&quot;,
-    //    fromNow: &quot;vanaf nu&quot;,
-    //    seconds: &quot;iets minder dan een minute&quot;,
-    //    minute: &quot;ongeveer een minuut&quot;,
-    //    minutes: &quot;%d minuten&quot;,
-    //    hour: &quot;ongeveer een uur&quot;,
-    //    hours: &quot;ongeveer %d uren&quot;,
-    //    day: &quot;een dag&quot;,
-    //    days: &quot;%d dagen&quot;,
-    //    month: &quot;ongeveer een maand&quot;,
-    //    months: &quot;%d maanden&quot;,
-    //    year: &quot;ongeveer een jaar&quot;,
-    //    years: &quot;%d jaar&quot;
-    // };
+    //loadPigLatin();
+    //loadRussian();
+    //loadYoungOldYears();
 
     jQuery(document).ready(function($) {
       // functional tests</diff>
      <filename>test.html</filename>
    </modified>
    <modified>
      <diff>@@ -14,3 +14,63 @@ jQuery(document).ready(function($) {
   $('abbr[class*=loaded]').attr(&quot;title&quot;, iso8601(new Date()));
   $('abbr[class*=modified]').attr(&quot;title&quot;, iso8601(new Date(document.lastModified)));
 });
+
+function loadPigLatin() {
+  jQuery.timeago.settings.strings = {
+    suffixAgo: &quot;ago-hay&quot;,
+    suffixFromNow: &quot;omNow-fray&quot;,
+    seconds: &quot;ess-lay an-thay a-hay inute-may&quot;,
+    minute: &quot;about-hay a-hay inute-may&quot;,
+    minutes: &quot;%d inutes-may&quot;,
+    hour: &quot;about-hay an-hay hour-hay&quot;,
+    hours: &quot;about-hay %d hours-hay&quot;,
+    day: &quot;a-hay ay-day&quot;,
+    days: &quot;%d ays-day&quot;,
+    month: &quot;about-hay a-hay onth-may&quot;,
+    months: &quot;%d onths-may&quot;,
+    year: &quot;about-hay a-hay ear-yay&quot;,
+    years: &quot;%d years-yay&quot;
+  };
+}
+
+function loadRussian() {
+  (function() {
+    function numpf(n, f, s, t) {
+      // f - 1, 21, 31, ...
+      // s - 2-4, 22-24, 32-34 ...
+      // t - 5-20, 25-30, ...
+      var n10 = n % 10;
+      if ( (n10 == 1) &amp;&amp; ( (n == 1) || (n &gt; 20) ) ) {
+        return f;
+      } else if ( (n10 &gt; 1) &amp;&amp; (n10 &lt; 5) &amp;&amp; ( (n &gt; 20) || (n &lt; 10) ) ) {
+        return s;
+      } else {
+        return t;
+      }
+    }
+
+    jQuery.timeago.settings.strings = {
+      prefixAgo: null,
+      prefixFromNow: &quot;&#1095;&#1077;&#1088;&#1077;&#1079;&quot;,
+      suffixAgo: &quot;&#1085;&#1072;&#1079;&#1072;&#1076;&quot;,
+      suffixFromNow: null,
+      seconds: &quot;&#1084;&#1077;&#1085;&#1100;&#1096;&#1077; &#1084;&#1080;&#1085;&#1091;&#1090;&#1099;&quot;,
+      minute: &quot;&#1084;&#1080;&#1085;&#1091;&#1090;&#1091;&quot;,
+      minutes: function(value) { return numpf(value, &quot;%d &#1084;&#1080;&#1085;&#1091;&#1090;&#1072;&quot;, &quot;%d &#1084;&#1080;&#1085;&#1091;&#1090;&#1099;&quot;, &quot;%d &#1084;&#1080;&#1085;&#1091;&#1090;&quot;); },
+      hour: &quot;&#1095;&#1072;&#1089;&quot;,
+      hours: function(value) { return numpf(value, &quot;%d &#1095;&#1072;&#1089;&quot;, &quot;%d &#1095;&#1072;&#1089;&#1072;&quot;, &quot;%d &#1095;&#1072;&#1089;&#1086;&#1074;&quot;); },
+      day: &quot;&#1076;&#1077;&#1085;&#1100;&quot;,
+      days: function(value) { return numpf(value, &quot;%d &#1076;&#1077;&#1085;&#1100;&quot;, &quot;%d &#1076;&#1085;&#1103;&quot;, &quot;%d &#1076;&#1085;&#1077;&#1081;&quot;); },
+      month: &quot;&#1084;&#1077;&#1089;&#1103;&#1094;&quot;,
+      months: function(value) { return numpf(value, &quot;%d &#1084;&#1077;&#1089;&#1103;&#1094;&quot;, &quot;%d &#1084;&#1077;&#1089;&#1103;&#1094;&#1072;&quot;, &quot;%d &#1084;&#1077;&#1089;&#1103;&#1094;&#1077;&#1074;&quot;); },
+      year: &quot;&#1075;&#1086;&#1076;&quot;,
+      years: function(value) { return numpf(value, &quot;%d &#1075;&#1086;&#1076;&quot;, &quot;%d &#1075;&#1086;&#1076;&#1072;&quot;, &quot;%d &#1083;&#1077;&#1090;&quot;); }
+    };
+  })();
+}
+
+function loadYoungOldYears() {
+  jQuery.extend(jQuery.timeago.settings.strings, {
+    years: function(value) { return (value &lt; 21) ? &quot;%d young years&quot; : &quot;%d old years&quot;; }
+  });
+}</diff>
      <filename>test.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d9e4ff342c9c468ed14e27eb254b41e6c925e198</id>
    </parent>
  </parents>
  <author>
    <name>Ryan McGeary</name>
    <email>ryanongit@mcgeary.org</email>
  </author>
  <url>http://github.com/rmm5t/jquery-timeago/commit/579b5c6f05608b7c2e167d2953f9c71bf95a1cb5</url>
  <id>579b5c6f05608b7c2e167d2953f9c71bf95a1cb5</id>
  <committed-date>2009-02-14T11:09:53-08:00</committed-date>
  <authored-date>2009-02-14T11:09:53-08:00</authored-date>
  <message>Added the ability to pass a function as a locale override [DimaD]

 * Good for cyrillic languages, like Russian</message>
  <tree>bf2e8f8b7a5010478bdc7119a9aac36de6819dda</tree>
  <committer>
    <name>Ryan McGeary</name>
    <email>ryanongit@mcgeary.org</email>
  </committer>
</commit>
