It could be great to handle date formatting with i18next and give example in the code
i18next
.use(initReactI18next)
.init({
resources,
lng: DEFAULT_I18N_LANGUAGE,
interpolation: {
escapeValue: false,
format: (value, format) => {
if (isDate(value)) {
return formatDate(value, format);
}
// List of custom formatters
if (format === 'minutesToHours') {
return minutesToHours(value)?.toString();
}
return value;
},
},
})
"create_by": "{{displayName}} le {{date, dd MMMM yyyy}}"
It could be great to handle date formatting with i18next and give example in the code