2017-06-06 1 views

Répondre

1

Vous pouvez:

i18next.init({ 
    interpolation: { 
     format: function(value, format, lng) { 
      if (format === 'intlDate') return new Intl.DateTimeFormat().format(value); // -> "12/20/2012" if run in en-US locale with time zone America/Los_Angeles 
      return value; 
     } 
    } 
}); 

JSON: key: today is the {{now, intlDate}}

appel t: i18next.t('key', { now: new Date() })