omar-khaium / kraya

Apache License 2.0
3 stars 0 forks source link

l10n support #2

Open omar-khaium opened 1 year ago

omar-khaium commented 1 year ago

flutter: generate: true

omar-khaium commented 1 year ago

need intl package in pubspec

omar-khaium commented 1 year ago

clear && flutter clean && clear && flutter gen-l10n && flutter pub get&& clear && flutter build appbundle && clear && open build/app/outputs/bundle/release

omar-khaium commented 1 year ago

"flutter gen-l10n " command will be required to generate l10n files and configs

omar-khaium commented 1 year ago

import 'package:flutter_gen/gen_l10n/app_localizations.dart'; //------ import this package on the file you need to implement language feature

omar-khaium commented 1 year ago

onGenerateTitle: (context) => AppLocalizations.of(context).appName, localizationsDelegates: AppLocalizations.localizationsDelegates, supportedLocales: AppLocalizations.supportedLocales, locale: const Locale("en"),

use these 4 lines in main.dart => MaterialApp