Localize your Flutter app to multiple locales within seconds
Why Flutter Locales
✅ Easily Localize your app
✅ Change App Locale within the app
✅ Get Last Changed locale on App starts
✅ Save Locale Language After changed buy LocaleNotifier
✅ Get Translation with LocaleText('key') Widget
voidmain() async {
WidgetsFlutterBinding.ensureInitialized();
awaitLocales.init(['en', 'fa', 'ps']); // get last saved language// remove await if you want to get app default languagerunApp(MyApp());
}
['en', 'fa', 'ps'] are language codes of .json files located in located in assets/locales folder
You can replace these languages with your languages
Wrap your MaterialApp with LocaleBuilder then provide locale to app
This project is a starting point for a Dart
package,
a library module containing code that can be shared easily across
multiple Flutter or Dart projects.
For help getting started with Flutter, view our
online documentation, which offers tutorials,
samples, guidance on mobile development, and a full API reference.