-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
Internal: b/146064414
There are many internal issues/questions/confusion around how Flutter does locale resolution. While we provide a way to override our basic resolution algorithm, developers want resolution behavior that is consistent with the underlying platform which is very tricky to achieve with x-plat code.
I have talked to @GaryQian and @jason-simmons about this and we sketched out a plan to provide additional information from embedders on each platform to Dart code. Currently, embedders provide only the user select system locale (if exists). In addition, we propose that embedders provide:
- The list of locales that the application supports.
- The list of ordered locales that the system recommends (a strict subset of the above).
Today, #1 is specified in Dart. However, it is also duplicated in Info.plist file on iOS. We need to figure out a way to pass a list of supported locales to embedder at build time. This will ensure we have a single source of truth for supported locales. pubspec is the current proposed way.