-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Labels
package:intl4xtype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
Default locale always fails.
final intl = Intl(); // <-- without locale
This code always cause problem.
Intl class implementaion is as follows
class Intl {
Locale locale;
/// Construct an [Intl] instance providing the current [locale].
Intl({Locale? locale}) : locale = locale ?? findSystemLocale();
then findSystemLocale is as follows
Locale findSystemLocale() {
try {
return Locale.parse(Platform.localeName);
} catch (e) {
return Locale.parse('und');
}
}
Platform.localeName returns locale name which uses _ as separator like en_US and so on
but it seems icu4x only accepts -(hypen) as locale name separator.
mosuem
Metadata
Metadata
Assignees
Labels
package:intl4xtype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)