Closed paurakhsharma closed 4 years ago
You can get something like the picture above when you pass 'ne'
as locale
.
The next thing you can do is either hide the header button by adding formatButtonVisible: false
to HeaderStyle
, or add your translation manually:
availableCalendarFormats: {
// add your translation here
CalendarFormat.month: 'Month',
CalendarFormat.twoWeeks: '2 weeks',
CalendarFormat.week: 'Week',
},
The last step would be to change how each day is displayed. You can use CalendarBuilders
for that - check example project for more details. I think you will need to make a method which takes in a number (date.day
) and returns a proper String in Nepali.
@aleksanderwozniak Awesome! Thank you, this should solve most of my problem
I am building a flutter app with internalization support. I have support for the Nepali language. I have added the translations for events but I was wondering if I could change the calendar as well to Nepali. Similar to https://pub.dev/packages/nepali_date_picker
I understand this is difficult and probably not worthy to be added to the library.
So, can you please suggest to me how I could implement this without official support in the library?