Skip to Content
Forui 0.11.0 is released 🎉
DocumentationLocalization

Localization

Forui supports all 115 languages that Flutter natively does.

To enable localization for Forui widgets, add the FLocalizations.delegate in your call to the constructor for CupertinoApp, MaterialApp, or WidgetsApp. Afterwards, add the locales supported by your application.

MaterialApp( localizationsDelegates: [ FLocalizations.delegate, // Add this line ], supportedLocales: [ // Add locales supported by your application here. ], builder: (context, child) => FTheme( data: FThemes.zinc.light, child: child!, ), home: FScaffold(...), );

The FLocalizations class also provides auto-generated localizationsDelegates and supportedLocales lists. You can use these instead of providing them manually if your application doesn’t have any other localization messages.

MaterialApp( localizationsDelegates: FLocalizations.localizationsDelegates, supportedLocales: FLocalizations.supportedLocales, builder: (context, child) => FTheme( data: FThemes.zinc.light, child: child!, ), home: FScaffold(...), );

Please see Internationalizing Flutter apps  for more information.

Last updated on