Hello,
I have put, thanks to moment to locale "fr", but for change week or for change the display mode, is still in englsih, do you know how can i change this.
Exemple: i want "week" in french "mois".
Hello, you have to create translation object and then pass it as a prop to calendar.
My translation object
const messages = {
allDay: 'Celý den',
previous: '<',
next: '>',
today: 'Dnes',
month: 'Měsíc',
week: 'Týden',
day: 'Den',
agenda: 'Agenda',
date: 'Datum',
time: 'Čas',
event: 'Událost',
showMore: total => `+ Zobrazit další (${total})`
};
And then pass it like this:<ReactBigCalendar messages={messages} .../>
Hope it helps.
@mathieusanchez, as @martinnov92 said, you have to set messages prop. Here is my message configuration for french language:
const messages = {
allDay: 'journée',
previous: 'précédent',
next: 'suivant',
today: 'aujourd\'hui',
month: 'mois',
week: 'semaine',
day: 'jour',
agenda: 'Agenda',
date: 'date',
time: 'heure',
event: 'événement', // Or anything you want
showMore: total => `+ ${total} événement(s) supplémentaire(s)`
}
How would you add localization/translation for all the months in a custom toolbar?
Can I translate or customize month and day name?
Thank you
Most helpful comment
Hello, you have to create translation object and then pass it as a prop to calendar.
My translation object
And then pass it like this:
<ReactBigCalendar messages={messages} .../>Hope it helps.