Flutter Internationalization With Easy Localization

Maneesha Erandi
The Startup
Published in
3 min readAug 29, 2020

--

Photo by Andrew Neel on Unsplash

Since app localization is very common with mobile app development I thought to write about one of my favorite flutter plugins. App internationalization is really fast and easy with easy_localization plugin. Specially with the latest update. I will guide you to create a simple app page with change language functionality.

To get started add the plugin dependency to your pubspec.yaml file and run packages get command.

dependencies:   
easy_localization: ^2.3.3

I used the above version. Always make sure you got the latest version of the plugin. Import the plugin to your dart file.

import 'package:easy_localization/easy_localization.dart';

In the main method add the following code. I have created assets folder inside my root folder and created the locales folder with my language translation files. (en-UK.json and es-SP.json). Give the path and supported locales correctly as you saved them. And also add you localization assets to your pubspec.yaml assets.

--

--