Localization
-
Dependencies:
- Ensure the
flutter_localizations
package is added to yourpubspec.yaml
.
- Ensure the
-
Configuration:
- Localization files are located in
lib/l10n/*.arb
. Add.arb
files for each language you want to support.
- Localization files are located in
-
Usage:
- The app supports English and French. Use the
AppLocalizations
class to get localized strings, e.g.,AppLocalizations.of(context)!.appTitle
. After adding new keys to any language file, runflutter gen-l10n
.
- The app supports English and French. Use the