Localization values can either be strings "{users}'s setting" or functions:
example: // Date.Extras ordinal: function(dayOfMonth){ // 1st, 2nd, 3rd, etc. return (dayOfMonth > 3 && dayOfMonth < 21) ? 'th' : ['th', 'st', 'nd', 'rd', 'th'][Math.min(dayOfMonth % 10, 4)]; }, Here the ordinal in english is different for 1st, 2nd, 3rd, etc. You can't just substitute a value as you can with the delta example. Otherwise just use substitution solutions. On Wed, Jan 25, 2012 at 12:19 AM, Raphael Audet <raphael.au...@gmail.com>wrote: > Allright thanks. > > Do you have a suggestion regarding other localization keys with variables > ? Such as "{users}'s setting" which is translated in french by "parametres > de {user}". > Is substitute also the recommended practice in this case? > > cheers > > Raphaël > > > On 25 January 2012 00:22, Aaron Newton <anut...@gmail.com> wrote: > >> Here you must use String.substitute. >> >> Local.get('Date.daysAgo').substitute({ delta: 2 }); >> >> It's more common to use the date method instead: >> Date.getTimePhrase(deltaInMS) >> >> >> On Tue, Jan 24, 2012 at 7:45 AM, Raphael Audet >> <raphael.au...@gmail.com>wrote: >> >>> Hi All >>> >>> I have using mootools 1.3.2 for a couple months now but I'm having a >>> problem using the Locale.get('Date.daysAgo') from mootools-more. >>> >>> I think it's a syntax problem but I keep getting "{delta} days ago" like >>> in this simple example : http://jsfiddle.net/BVpqn/3/ >>> >>> It there a way to replace the "delta" with a value of mine ? >>> >>> >>> cheers >>> >>> Raphaël >>> >> >> >