React-big-calendar: How can i change language of days in a week?

Created on 19 Jan 2018  路  9Comments  路  Source: jquense/react-big-calendar

currently, i don't know how to change Monday or Friday into my language. How can i do that?
Many thanks

Most helpful comment

the example used moment:
import moment from 'moment'; moment.locale('en'); BigCalendar.setLocalizer( BigCalendar.momentLocalizer(moment) );

TypeError: __WEBPACK_IMPORTED_MODULE_6_react_big_calendar___default.a.setLocalizer is not a function

@seeyoumr i already done it but this appeared
Module not found: Can't resolve 'globalize/lib/cultures/globalize.culture.fr' in '/Users/nguyen/Desktop/Code/webgiasu/front-end/src/modules/generalschedule/tabs'
Same error.

Also Can't resolve 'cldr' in '/home/niejfklj/Documents/helj/node_modules/globalize/dist

I dont want to use globalize as it seem that I need to modify the webpack config of the project as seen here
Where can we find a working sample with moment to change the languages of the days of the week, because its not changable in the messages props.

All 9 comments

You set that up in your localizer. There's even an example on the site, here's the code for that: https://github.com/intljusticemission/react-big-calendar/blob/master/examples/demos/cultures.js

how can i find or setup require('globalize/lib/cultures/globalize.culture.en-GB')?

npm install globalize or yarn add globalize锛宼hen锛宒o require

@seeyoumr i already done it but this appeared
Module not found: Can't resolve 'globalize/lib/cultures/globalize.culture.fr' in '/Users/nguyen/Desktop/Code/webgiasu/front-end/src/modules/generalschedule/tabs'

Hello

I need have the same issue, what is the content of globalize.culture file?? Where I can find that information?

Regards

you can find information about localizers on their respective websites, either moment or globalize

the example used moment:
import moment from 'moment'; moment.locale('en'); BigCalendar.setLocalizer( BigCalendar.momentLocalizer(moment) );

the example used moment:
import moment from 'moment'; moment.locale('en'); BigCalendar.setLocalizer( BigCalendar.momentLocalizer(moment) );

TypeError: __WEBPACK_IMPORTED_MODULE_6_react_big_calendar___default.a.setLocalizer is not a function

@seeyoumr i already done it but this appeared
Module not found: Can't resolve 'globalize/lib/cultures/globalize.culture.fr' in '/Users/nguyen/Desktop/Code/webgiasu/front-end/src/modules/generalschedule/tabs'
Same error.

Also Can't resolve 'cldr' in '/home/niejfklj/Documents/helj/node_modules/globalize/dist

I dont want to use globalize as it seem that I need to modify the webpack config of the project as seen here
Where can we find a working sample with moment to change the languages of the days of the week, because its not changable in the messages props.

downgrade globalise and then it works

Was this page helpful?
0 / 5 - 0 ratings

Related issues

connercms picture connercms  路  3Comments

gsavvid picture gsavvid  路  3Comments

nirchernia picture nirchernia  路  3Comments

nicolasriccardi picture nicolasriccardi  路  3Comments

tiaaaa123 picture tiaaaa123  路  4Comments