Flutter Localization the Easy Way – Internationalization with JSON
Flutter localization - Let's face it. When you're building an app which you plan to release to the public, having it in just one language isn't going to cut it. While English is definitely one of the most spoken languages throughout the world, internationalizing your apps is really a must. Contrary to frameworks like native Android, Flutter doesn't have an absolutely set way of how localization is done. It gives you a lot of freedom which can be good if you know what you're doing, but also extremely confusing if you're just starting out. In this tutorial, you're going to learn how to localize your apps the simple way by using JSON files to store your strings in multiple languages. Prepare your project Before writing Dart code to access the JSON files containing translated strings, you actually need to create the files first and update the pubspec file. Create the language files Create a new folder lang in the project root. This folder ...