GaspardMerten / date_field

Flutter DateField and DateFormField
Other
46 stars 32 forks source link

Add localisation support #50

Closed TOMSLAUS closed 10 months ago

DaniLaguna commented 1 year ago

It would be great to have the ability to display the days with their initials in different languages.

It would also be interesting to be able to change the first day of the week (Monday or Sunday)

torbenkeller commented 10 months ago

The dialogs get localized using the MaterialLocalizations and CupertinoLocalizations. You can use it by adding the localization delegates to your MaterialApp:

localizationsDelegates: const [
  DefaultMaterialLocalizations.delegate,
  DefaultCupertinoLocalizations.delegate,
  DefaultWidgetsLocalizations.delegate,
],

Also the displayed date is localizable using the dateFormat property