localizations library
Localizations for Forui widgets. Forui supports all 115 languages supported by Material.
To enable localizations, add FLocalizations.delegate
in your call to the constructor for CupertinoApp
,
MaterialApp
, or WidgetsApp
:
Widget build(BuildContext context) => MaterialApp(
localizationsDelegates: [
FLocalizations.delegate, // Add this line
],
supportedLocales: [
// Add locales supported by your application here.
// Alternatively, you can pass in `FLocalizations.supportedLocales` instead.
],
builder: (context, child) => FTheme(
data: FThemes.zinc.light,
child: child!,
),
home: const FScaffold(...),
);
Classes
- FDefaultLocalizations
- The default localization for when no localization is provided.
- FLocalizations
-
Callers can lookup localized strings with an instance of FLocalizations
returned by
FLocalizations.of(context)
.
Extensions
- FDateTimeLocalizations on FLocalizations
- Localizations for date and time formatting.
Constants
-
scriptPeriods
→ const List<
String> - The locales which period is written in a script that requires composing:
Functions
-
lookupFLocalizations(
Locale locale) → FLocalizations