Hello there.
How to ensure my dates are translated correctly?
I’ve set the blog post date to be localized in the models.
I see this in the compontents/date.js (took the next.js-i18n-blog-demo)
import { parseISO, format } from ‘date-fns’
export default function Date({ dateString }) {
const date = parseISO(dateString)
return {format(date, ‘LLLL d, yyyy’)}
}
Yet on the front end, In all my languages, I see the date as February 8, 2023
Ideally, it would be translated to the correct month name in my language.
Not sure what to do.
Thank you.