Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 94e0989

Browse files
committed
Remove locale prepend on iOS
1 parent 75d34c2 commit 94e0989

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

shell/platform/darwin/ios/framework/Source/FlutterEngine.mm

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -762,22 +762,6 @@ - (void)onLocaleUpdated:(NSNotification*)notification {
762762
NSArray<NSString*>* preferredLocales = [NSLocale preferredLanguages];
763763
NSMutableArray<NSString*>* data = [[NSMutableArray new] autorelease];
764764

765-
// Force prepend the [NSLocale currentLocale] to the front of the list
766-
// to ensure we are including the full default locale. preferredLocales
767-
// is not guaranteed to include anything beyond the languageCode.
768-
NSLocale* currentLocale = [NSLocale currentLocale];
769-
NSString* languageCode = [currentLocale objectForKey:NSLocaleLanguageCode];
770-
NSString* countryCode = [currentLocale objectForKey:NSLocaleCountryCode];
771-
NSString* scriptCode = [currentLocale objectForKey:NSLocaleScriptCode];
772-
NSString* variantCode = [currentLocale objectForKey:NSLocaleVariantCode];
773-
if (languageCode) {
774-
[data addObject:languageCode];
775-
[data addObject:(countryCode ? countryCode : @"")];
776-
[data addObject:(scriptCode ? scriptCode : @"")];
777-
[data addObject:(variantCode ? variantCode : @"")];
778-
}
779-
780-
// Add any secondary locales/languages to the list.
781765
for (NSString* localeID in preferredLocales) {
782766
NSLocale* currentLocale = [[[NSLocale alloc] initWithLocaleIdentifier:localeID] autorelease];
783767
NSString* languageCode = [currentLocale objectForKey:NSLocaleLanguageCode];

0 commit comments

Comments
 (0)