rouftom / react-mui-scheduler

React material planner is a react component based on @mui v5 that allows you to manage data in a calendar
https://rouftom.github.io/react-mui-scheduler-demo/
MIT License
64 stars 29 forks source link

Add a property to handle custom locale #15

Open Angrigo opened 1 year ago

Angrigo commented 1 year ago

When developing an application not always we want default languages, the idea is to provide a detailed locale property instead of just a string

<Scheduler 
locale={{
  "day": "Day",
  "week": "Week",
  "month": "Month",
  "timeline": "Timeline",
  "mon": "Mon",
  "tue": "Tue",
  "wed": "Wed",
  "thu": "Thu",
  "fri": "Fri",
  "sat": "Sat",
  "sun": "Sun",
  "search": "Search..."
}}
events={events}
legacyStyle={false}
...
/>

by doing so you prevent forking this project just to change locale and give more customization options