Integration i18n with Remote Config. The package help you implements remote config. The objective is create redundance your application, if remote config failure the package return your local json.
You can use FlutterModular your application for package running!
Create folder lang your root application.
Add folder your pubspec.yaml.
Add your locale.json in folder lang.
ATTENTION! : language_COUNTRY.json
Add file configuration Firebase, Android(GoogleService.json) and iOS(GoogleService-Info.plist)
Configure your MaterialApp. Add LocalizationsDelegates and supportedLocales your application
Add I18nLocalizations your AppModule
If you use packages, add I18nLocalizations(["name_package"])
For you use extension i18n import your page or widget
import 'package:i18n_remote_config/i18n_remote_config.dart';
And simple use your application. "KEY".i18n()
If you can pass params your string, use:
- JSON FILE
{
"title" : "WITH PARAMS ONE: $0, TWO: $1"
}
- EXAMPLE DART
"title".i18n(params: "FLUTTER","DART")