question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I can't switch the language

See original GitHub issue

Hey, I would like to have my calendar in French but it’s not working. I use moment.

import moment from "moment";
moment.locale("fr");
moment.updateLocale("fr", {
	week: {
		dow: 1,
		doy: 4,
	},
});
const localizer = momentLocalizer(moment);
<Calendar
	messages={messages}
	localizer={localizer}
	defaultDate={new Date()}
	defaultView="month"
	events={events}
	style={{ height: "80vh" }}
/>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

5reactions
mathsantanacommented, Jun 23, 2021

i have same issue with date-fns

I solved like this. Basically passing culture as a prop, like culture={"pt-BR"}. Hope it helps.

3reactions
Gulivertxcommented, Oct 20, 2020

hmm seems that you forgot to import the language:

import moment from "moment";
import 'moment/locale/fr';
moment.locale("fr");
moment.updateLocale("fr", {
	week: {
		dow: 1,
		doy: 4,
	},
});
const localizer = momentLocalizer(moment);
<Calendar
	messages={messages}
	localizer={localizer}
	defaultDate={new Date()}
	defaultView="month"
	events={events}
	style={{ height: "80vh" }}
/>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't switch keyboard language in Windows 11/10
Go to Control Panel > Clock, Language, and Region > Language and change language order or move up or down them. Recheck if...
Read more >
i can't switch the input language - Microsoft Community
i can't switch the input language · 1. Click Start · 2. In the Start Search box, type task scheduler. · 3. In...
Read more >
Can't Change Display Language in Windows 11? Here's the Fix
What can I do if I can't change the display language? 1. Install the language pack. Press the Windows + I keys to...
Read more >
FIX: Windows 10 Display Language Not Changing (Solved)
How to fix: Cannot Change the Windows 10 Display Language. · Method 1. Download the Language Pack. · Method 2. Remove & re-Install...
Read more >
Change your language on the web - Computer - Google Support
Fix problems with changing language · The language change didn't work: If your Google Account doesn't match the language you selected, clear your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found