initDefaultLocale function
Initializes Intl.defaultLocale for formatting dates, times, and numbers.
If locale is not specified, the system locale is used.
See also:
Intl.defaultLocaleIntl.systemLocale
Implementation
Future<void> initDefaultLocale([String? locale]) async {
Intl.defaultLocale = locale ??
await findSystemLocale()
// Fallback to 'en' if the system locale is 'POSIX' or undefined.
.then((l) => l == 'POSIX' || l == 'und' ? 'en' : l);
}