Internationalizing Flutter apps the easy way

When you think of deploying an app across multiple geographic locations, you should _internationalize _your app to make users feel at home while using it. Flutter now comes with a localization tool which makes it very easy for the developers to incorporate multiple languages in the application.

In this article, we will look at how we can internationalize our Flutter apps in a very simple way. So let’s get started!

Getting Started

Let’s start off by creating a new Flutter project. We will cover the following points in this article:

  • Use two different Locales, English and Spanish in this case
  • Override the device default Locale for some parts of the app
  • Give user the ability to change the Locale from within the app
  • Pass parameters to the Locale messages

NOTE: The example is going to be a simple one so that we can focus more on the Internationalization and Localization aspect.

Update the pubspec.yaml file

Update the pubspec.yaml to include the flutter_localizations ,intl and provider packages.

dependencies:
  flutter:

  ## Internationalization support.
  flutter_localizations:
    sdk: flutter
  intl: 0.16.1
  provider: ^4.3.2+2
flutter:
## Adds code generation (synthetic package) support
generate: true

#flutter #localization #internationalization

Flutter Internationalization done right
1.65 GEEK