DEV Community


Flutter localization gotcha with iOS Emulator

Jethro Lorenzo Garcia Lising
Hello, I write codes that do things Currently in love with #flutter
・1 min read


When you use the intl package to get the current locale, it will always return English or 'en', when you use the iOS simulator.

Even when you set the language and region in the iOS settings, it will always return 'en'.

// This retrieves the current local
Intl.getCurrentLocale();  // returns 'en' using iOS Simulator


Came across this github issue.

And the solution was found.

Edit info.plist found in ios/Runner and add two configurations:

  1. Localizations

Add your supported languages or any languages that you need to test.

  1. Localized resources can be mixed

Set to YES.

For good measure, flutter clean and rebuild.

Discussion (0)

Forem Open with the Forem app