Open joj3000 opened 4 years ago
time_machine is used internally for all date & time formatting. By default, it uses en_US
as its locale (managed by the Culture
class) and doesn't know about Flutter's locale. To change it to French, set Culture.current
after the call to TimeMachine.initialize
:
await TimeMachine.initialize({'rootBundle': rootBundle});
// Supported cultures: https://github.com/Dana-Ferguson/time_machine/tree/master/lib/data/cultures
Culture.current = await Cultures.getCulture('fr');
runApp(/* ... */);
There's an open issue for time_machine to provide a LocalizationsDelegate
for easier integration: Dana-Ferguson/time_machine#28
Great, thank you very much !
@JonasWanke, could You put this info in readme? Some newbies won't dig in PRs to find out that and this is probably why flutter_week_view package is more popular, even I think Your one is better.
@JulianKowalczuk Thanks! I've just published v0.2.5 and added a Localization section to the README.
I'll still leave this issue open as I want to simplify this soon.
Hi,
How would you change the language/name for the days ? (I want to use the French names for the days).
I've tried many things :
Thanks, and again great package !