FluentLocalizations class abstract
Callers can lookup localized strings with an instance of FluentLocalizations
returned by FluentLocalizations.of(context)
.
Applications need to include FluentLocalizations.delegate()
in their app's
localizationDelegates
list, and the locales they support in the app's
supportedLocales
list. For example:
import 'generated/fluent_localizations.dart';
return MaterialApp(
localizationsDelegates: FluentLocalizations.localizationsDelegates,
supportedLocales: FluentLocalizations.supportedLocales,
home: MyApplicationHome(),
);
Update pubspec.yaml
Please make sure to update your pubspec.yaml to include the following packages:
dependencies:
# Internationalization support.
flutter_localizations:
sdk: flutter
intl: any # Use the pinned version from flutter_localizations
# Rest of dependencies
iOS Applications
iOS applications define key application metadata, including supported locales, in an Info.plist file that is built into the application bundle. To configure the locales supported by your app, you’ll need to edit this file.
First, open your project’s ios/Runner.xcworkspace Xcode workspace file. Then, in the Project Navigator, open the Info.plist file under the Runner project’s Runner folder.
Next, select the Information Property List item, select Add Item from the Editor menu, then select Localizations from the pop-up menu.
Select and expand the newly-created Localizations item then, for each locale your application supports, add a new item and select the locale you wish to add from the pop-up menu in the Value field. This list should be consistent with the languages listed in the FluentLocalizations.supportedLocales property.
- Implementers
- FluentLocalizationsAr
- FluentLocalizationsBe
- FluentLocalizationsBn
- FluentLocalizationsCa
- FluentLocalizationsCs
- FluentLocalizationsDe
- FluentLocalizationsEl
- FluentLocalizationsEn
- FluentLocalizationsEs
- FluentLocalizationsFa
- FluentLocalizationsFr
- FluentLocalizationsHe
- FluentLocalizationsHi
- FluentLocalizationsHr
- FluentLocalizationsHu
- FluentLocalizationsId
- FluentLocalizationsIt
- FluentLocalizationsJa
- FluentLocalizationsKo
- FluentLocalizationsKu
- FluentLocalizationsMs
- FluentLocalizationsMy
- FluentLocalizationsNl
- FluentLocalizationsPl
- FluentLocalizationsPt
- FluentLocalizationsRo
- FluentLocalizationsRu
- FluentLocalizationsSk
- FluentLocalizationsSv
- FluentLocalizationsTa
- FluentLocalizationsTh
- FluentLocalizationsTr
- FluentLocalizationsUk
- FluentLocalizationsUr
- FluentLocalizationsUz
- FluentLocalizationsVi
- FluentLocalizationsZh
- Available extensions
Constructors
- FluentLocalizations(String locale)
Properties
- am → String
-
The text used by TimePicker for the AM field.
no setter
- backButtonTooltip → String
-
The tooltip for the back button on NavigationAppBar.
no setter
- blueLabel → String
-
Label for blue color component in color picker
no setter
- clickToSearch → String
-
The tooltip for the "Click to Search" button.
no setter
- closeButtonLabel → String
-
Label for "close" buttons and menu items.
no setter
-
The tooltip for the toggle navigation button.
no setter
- closeTabLabel → String
-
Available on FluentLocalizations, provided by the FluentLocalizationsExtension extension
The label used by TabView's close button.no setter - closeTabLabelSuffix → String
-
The label used by TabView's close button.
no setter
- closeWindowTooltip → String
-
The tooltip used by the "Close" button on desktop windows.
no setter
- colorAliceBlue → String
-
The name of the color, Alice Blue.
no setter
- colorAntiqueWhite → String
-
The name of the color, Antique White.
no setter
- colorAquamarine → String
-
The name of the color, Aquamarine.
no setter
- colorAzure → String
-
The name of the color, Azure.
no setter
- colorBeige → String
-
The name of the color, Beige.
no setter
- colorBisque → String
-
The name of the color, Bisque.
no setter
- colorBlack → String
-
The name of the color, Black.
no setter
- colorBlanchedAlmond → String
-
The name of the color, Blanched Almond.
no setter
- colorBlue → String
-
The name of the color, Blue.
no setter
- colorBlueViolet → String
-
The name of the color, Blue Violet.
no setter
- colorBrown → String
-
The name of the color, Brown.
no setter
- colorBurlyWood → String
-
The name of the color, Burly Wood.
no setter
- colorCadetBlue → String
-
The name of the color, Cadet Blue.
no setter
- colorChartreuse → String
-
The name of the color, Chartreuse.
no setter
- colorChocolate → String
-
The name of the color, Chocolate.
no setter
- colorCoral → String
-
The name of the color, Coral.
no setter
- colorCornflowerBlue → String
-
The name of the color, Cornflower Blue.
no setter
- colorCornsilk → String
-
The name of the color, Cornsilk.
no setter
- colorCrimson → String
-
The name of the color, Crimson.
no setter
- colorCyan → String
-
The name of the color, Cyan.
no setter
- colorDarkBlue → String
-
The name of the color, Dark Blue.
no setter
- colorDarkCyan → String
-
The name of the color, Dark Cyan.
no setter
- colorDarkGoldenrod → String
-
The name of the color, Dark Goldenrod.
no setter
- colorDarkGray → String
-
The name of the color, Dark Gray.
no setter
- colorDarkGreen → String
-
The name of the color, Dark Green.
no setter
- colorDarkKhaki → String
-
The name of the color, Dark Khaki.
no setter
- colorDarkMagenta → String
-
The name of the color, Dark Magenta.
no setter
- colorDarkOliveGreen → String
-
The name of the color, Dark Olive Green.
no setter
- colorDarkOrange → String
-
The name of the color, Dark Orange.
no setter
- colorDarkOrchid → String
-
The name of the color, Dark Orchid.
no setter
- colorDarkRed → String
-
The name of the color, Dark Red.
no setter
- colorDarkSalmon → String
-
The name of the color, Dark Salmon.
no setter
- colorDarkSeaGreen → String
-
The name of the color, Dark Sea Green.
no setter
- colorDarkSlateBlue → String
-
The name of the color, Dark Slate Blue.
no setter
- colorDarkSlateGray → String
-
The name of the color, Dark Slate Gray.
no setter
- colorDarkTurquoise → String
-
The name of the color, Dark Turquoise.
no setter
- colorDarkViolet → String
-
The name of the color, Dark Violet.
no setter
- colorDeepPink → String
-
The name of the color, Deep Pink.
no setter
- colorDeepSkyBlue → String
-
The name of the color, Deep Sky Blue.
no setter
- colorDimGray → String
-
The name of the color, Dim Gray.
no setter
- colorDodgerBlue → String
-
The name of the color, Dodger Blue.
no setter
- colorFirebrick → String
-
The name of the color, Firebrick.
no setter
- colorFloralWhite → String
-
The name of the color, Floral White.
no setter
- colorForestGreen → String
-
The name of the color, Forest Green.
no setter
- colorGainsboro → String
-
The name of the color, Gainsboro.
no setter
- colorGhostWhite → String
-
The name of the color, Ghost White.
no setter
- colorGold → String
-
The name of the color, Gold.
no setter
- colorGoldenrod → String
-
The name of the color, Goldenrod.
no setter
- colorGray → String
-
The name of the color, Gray.
no setter
- colorGreen → String
-
The name of the color, Green.
no setter
- colorGreenYellow → String
-
The name of the color, Green Yellow.
no setter
- colorHoneydew → String
-
The name of the color, Honeydew.
no setter
- colorHotPink → String
-
The name of the color, Hot Pink.
no setter
- colorIndianRed → String
-
The name of the color, Indian Red.
no setter
- colorIndigo → String
-
The name of the color, Indigo.
no setter
- colorIvory → String
-
The name of the color, Ivory.
no setter
- colorKhaki → String
-
The name of the color, Khaki.
no setter
- colorLavender → String
-
The name of the color, Lavender.
no setter
- colorLavenderBlush → String
-
The name of the color, Lavender Blush.
no setter
- colorLawnGreen → String
-
The name of the color, Lawn Green.
no setter
- colorLemonChiffon → String
-
The name of the color, Lemon Chiffon.
no setter
- colorLightBlue → String
-
The name of the color, Light Blue.
no setter
- colorLightCoral → String
-
The name of the color, Light Coral.
no setter
- colorLightCyan → String
-
The name of the color, Light Cyan.
no setter
- colorLightGoldenrodYellow → String
-
The name of the color, Light Goldenrod Yellow.
no setter
- colorLightGray → String
-
The name of the color, Light Gray.
no setter
- colorLightGreen → String
-
The name of the color, Light Green.
no setter
- colorLightPink → String
-
The name of the color, Light Pink.
no setter
- colorLightSalmon → String
-
The name of the color, Light Salmon.
no setter
- colorLightSeaGreen → String
-
The name of the color, Light Sea Green.
no setter
- colorLightSkyBlue → String
-
The name of the color, Light Sky Blue.
no setter
- colorLightSlateGray → String
-
The name of the color, Light Slate Gray.
no setter
- colorLightSteelBlue → String
-
The name of the color, Light Steel Blue.
no setter
- colorLightYellow → String
-
The name of the color, Light Yellow.
no setter
- colorLime → String
-
The name of the color, Lime.
no setter
- colorLimeGreen → String
-
The name of the color, Lime Green.
no setter
- colorLinen → String
-
The name of the color, Linen.
no setter
- colorMagenta → String
-
The name of the color, Magenta.
no setter
- colorMaroon → String
-
The name of the color, Maroon.
no setter
- colorMediumAquamarine → String
-
The name of the color, Medium Aquamarine.
no setter
- colorMediumBlue → String
-
The name of the color, Medium Blue.
no setter
- colorMediumOrchid → String
-
The name of the color, Medium Orchid.
no setter
- colorMediumPurple → String
-
The name of the color, Medium Purple.
no setter
- colorMediumSeaGreen → String
-
The name of the color, Medium Sea Green.
no setter
- colorMediumSlateBlue → String
-
The name of the color, Medium Slate Blue.
no setter
- colorMediumSpringGreen → String
-
The name of the color, Medium Spring Green.
no setter
- colorMediumTurquoise → String
-
The name of the color, Medium Turquoise.
no setter
- colorMediumVioletRed → String
-
The name of the color, Medium Violet Red.
no setter
- colorMidnightBlue → String
-
The name of the color, Midnight Blue.
no setter
- colorMintCream → String
-
The name of the color, Mint Cream.
no setter
- colorMistyRose → String
-
The name of the color, Misty Rose.
no setter
- colorMoccasin → String
-
The name of the color, Moccasin.
no setter
-
The name of the color, Navajo White.
no setter
-
The name of the color, Navy.
no setter
- colorOldLace → String
-
The name of the color, Old Lace.
no setter
- colorOlive → String
-
The name of the color, Olive.
no setter
- colorOliveDrab → String
-
The name of the color, Olive Drab.
no setter
- colorOrange → String
-
The name of the color, Orange.
no setter
- colorOrangeRed → String
-
The name of the color, Orange Red.
no setter
- colorOrchid → String
-
The name of the color, Orchid.
no setter
- colorPaleGoldenrod → String
-
The name of the color, Pale Goldenrod.
no setter
- colorPaleGreen → String
-
The name of the color, Pale Green.
no setter
- colorPaleTurquoise → String
-
The name of the color, Pale Turquoise.
no setter
- colorPaleVioletRed → String
-
The name of the color, Pale Violet Red.
no setter
- colorPapayaWhip → String
-
The name of the color, Papaya Whip.
no setter
- colorPeachPuff → String
-
The name of the color, Peach Puff.
no setter
- colorPeru → String
-
The name of the color, Peru.
no setter
- colorPink → String
-
The name of the color, Pink.
no setter
- colorPlum → String
-
The name of the color, Plum.
no setter
- colorPowderBlue → String
-
The name of the color, Powder Blue.
no setter
- colorPurple → String
-
The name of the color, Purple.
no setter
- colorRed → String
-
The name of the color, Red.
no setter
- colorRosyBrown → String
-
The name of the color, Rosy Brown.
no setter
- colorRoyalBlue → String
-
The name of the color, Royal Blue.
no setter
- colorSaddleBrown → String
-
The name of the color, Saddle Brown.
no setter
- colorSalmon → String
-
The name of the color, Salmon.
no setter
- colorSandyBrown → String
-
The name of the color, Sandy Brown.
no setter
- colorSeaGreen → String
-
The name of the color, Sea Green.
no setter
- colorSeaShell → String
-
The name of the color, Sea Shell.
no setter
- colorSienna → String
-
The name of the color, Sienna.
no setter
- colorSilver → String
-
The name of the color, Silver.
no setter
- colorSkyBlue → String
-
The name of the color, Sky Blue.
no setter
- colorSlateBlue → String
-
The name of the color, Slate Blue.
no setter
- colorSlateGray → String
-
The name of the color, Slate Gray.
no setter
- colorSnow → String
-
The name of the color, Snow.
no setter
- colorSpringGreen → String
-
The name of the color, Spring Green.
no setter
- colorSteelBlue → String
-
The name of the color, Steel Blue.
no setter
- colorTan → String
-
The name of the color, Tan.
no setter
- colorTeal → String
-
The name of the color, Teal.
no setter
- colorThistle → String
-
The name of the color, Thistle.
no setter
- colorTomato → String
-
The name of the color, Tomato.
no setter
- colorTurquoise → String
-
The name of the color, Turquoise.
no setter
- colorViolet → String
-
The name of the color, Violet.
no setter
- colorWheat → String
-
The name of the color, Wheat.
no setter
- colorWhite → String
-
The name of the color, White.
no setter
- colorWhiteSmoke → String
-
The name of the color, White Smoke.
no setter
- colorYellow → String
-
The name of the color, Yellow.
no setter
- colorYellowGreen → String
-
The name of the color, Yellow Green.
no setter
- copyActionLabel → String
-
The label for the copy action on the text selection controls.
no setter
- copyActionTooltip → String
-
The tooltip for the copy action on the text selection controls.
no setter
- copyShortcut → String
-
Available on FluentLocalizations, provided by the FluentLocalizationsExtension extension
The copy shortcut label used by text selection controls.no setter - cutActionLabel → String
-
The label for the cut action on the text selection controls.
no setter
- cutActionTooltip → String
-
The tooltip for the cut action on the text selection controls.
no setter
- cutShortcut → String
-
Available on FluentLocalizations, provided by the FluentLocalizationsExtension extension
The cut shortcut label used by text selection controls.no setter - day → String
-
The text used by DatePicker for the day field
no setter
- dialogLabel → String
-
The dialog label.
no setter
- greenLabel → String
-
Label for green color component in color picker
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hour → String
-
The text used by TimePicker for the hour field.
no setter
- hueLabel → String
-
Label for hue component in color picker
no setter
- lessText → String
-
Text for collapsing color picker options
no setter
- localeName → String
-
final
- minimizeWindowTooltip → String
-
The tooltip used by the "Minimize" button on desktop windows.
no setter
- minute → String
-
The text used by TimePicker for the minute field.
no setter
- modalBarrierDismissLabel → String
-
Label read out by accessibility tools (TalkBack or VoiceOver) for a modal barrier to indicate that a tap dismisses the barrier. A modal barrier can for example be found behind an alert or popup to block user interaction with elements behind it.
no setter
- month → String
-
The text used by DatePicker for the month field
no setter
- moreText → String
-
Text for expanding color picker options
no setter
- newTabLabel → String
-
The label used by TabView's new button.
no setter
- noResultsFoundLabel → String
-
The label used by AutoSuggestBox when the results can't be found.
no setter
- opacityLabel → String
-
Label for opacity component in color picker
no setter
-
The tooltip for the toogle navigation button.
no setter
- pasteActionLabel → String
-
The label for the paste button on the text selection controls.
no setter
- pasteActionTooltip → String
-
The tooltip for the paste action on the text selection controls.
no setter
- pasteShortcut → String
-
Available on FluentLocalizations, provided by the FluentLocalizationsExtension extension
The paste shortcut label used by text selection controls.no setter - pm → String
-
The text used by TimePicker for the PM field.
no setter
- redLabel → String
-
Label for red color component in color picker
no setter
- restoreWindowTooltip → String
-
The tooltip used by the "Restore" button on desktop windows.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- saturationLabel → String
-
Label for saturation component in color picker
no setter
- scrollTabBackwardLabel → String
-
The label used by TabView's scroll backward button.
no setter
- scrollTabForwardLabel → String
-
The label used by TabView's scroll forward button.
no setter
- searchLabel → String
-
Label for "search" text fields.
no setter
- selectAllActionLabel → String
-
The label for the select all button on the text selection controls.
no setter
- selectAllActionTooltip → String
-
The tooltip for the select all action on the text selection controls.
no setter
- selectAllShortcut → String
-
Available on FluentLocalizations, provided by the FluentLocalizationsExtension extension
The select all shortcut label used by text selection controls.no setter - valueLabel → String
-
Label for value component in color picker
no setter
- year → String
-
The text used by DatePicker for the year field
no setter
Methods
-
getColorDisplayName(
String colorKey) → String -
Available on FluentLocalizations, provided by the FluentLocalizationsExtension extension
Returns DisplayName of the color -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
of(
BuildContext context) → FluentLocalizations
Constants
-
delegate
→ const LocalizationsDelegate<
FluentLocalizations> -
localizationsDelegates
→ const List<
LocalizationsDelegate> - A list of this localizations delegate along with the default localizations delegates.
-
supportedLocales
→ const List<
Locale> - A list of this localizations delegate's supported locales.