Closed SiyrisSoul closed 5 years ago
I just did some tests on both iOS simulator and an iPhone and there are some issues.
On iOS, in release mode, the Platform.localeName returns null and it seems this is intended, based on https://github.com/flutter/flutter/issues/24747
In debug mode, it always returns the region locale, instead of the selected language, so here we have the issue from https://github.com/bratan/flutter_translate/issues/14.
So basically this would only fix the black screen on Android for https://github.com/bratan/flutter_translate/issues/13
I`m going to do some more tests today and probably implement a platform channel call for iOS to retrieve the current device language during startup.
Thanks for making me aware of that behavior! I need to get an iOS device now I suppose :grimacing:
I just did some tests on both iOS simulator and an iPhone and there are some issues.
On iOS, in release mode, the Platform.localeName returns null and it seems this is intended, based on flutter/flutter#24747
In debug mode, it always returns the region locale, instead of the selected language, so here we have the issue from #14.
So basically this would only fix the black screen on Android for #13
I`m going to do some more tests today and probably implement a platform channel call for iOS to retrieve the current device language during startup.
Any update on this? If you are busy I could implement the platform channel call, but you would have to test it as I don't have a way to test on iOS :)
I`m going to implement it most likely tomorrow.
@TutOsirisOm - It's done. We now have a consistent implementation for both Android/iOS.
Fixes issue #13 and possibly #14 but I don't have an iOS device to test on. Takes into account if there are preferences on the device and if not loads the device locale.