ShadcnLocalizations class abstract

Callers can lookup localized strings with an instance of ShadcnLocalizations returned by ShadcnLocalizations.of(context).

Applications need to include ShadcnLocalizations.delegate() in their app's localizationDelegates list, and the locales they support in the app's supportedLocales list. For example:

import 'locale/shadcn_localizations.dart';

return MaterialApp(
  localizationsDelegates: ShadcnLocalizations.localizationsDelegates,
  supportedLocales: ShadcnLocalizations.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 ShadcnLocalizations.supportedLocales property.

Available extensions

Constructors

ShadcnLocalizations(String locale)

Properties

abbreviatedApril String
No description provided for @abbreviatedApril.
no setter
abbreviatedAugust String
No description provided for @abbreviatedAugust.
no setter
abbreviatedDecember String
No description provided for @abbreviatedDecember.
no setter
abbreviatedFebruary String
No description provided for @abbreviatedFebruary.
no setter
abbreviatedFriday String
No description provided for @abbreviatedFriday.
no setter
abbreviatedJanuary String
No description provided for @abbreviatedJanuary.
no setter
abbreviatedJuly String
No description provided for @abbreviatedJuly.
no setter
abbreviatedJune String
No description provided for @abbreviatedJune.
no setter
abbreviatedMarch String
No description provided for @abbreviatedMarch.
no setter
abbreviatedMay String
No description provided for @abbreviatedMay.
no setter
abbreviatedMonday String
No description provided for @abbreviatedMonday.
no setter
abbreviatedNovember String
No description provided for @abbreviatedNovember.
no setter
abbreviatedOctober String
No description provided for @abbreviatedOctober.
no setter
abbreviatedSaturday String
No description provided for @abbreviatedSaturday.
no setter
abbreviatedSeptember String
No description provided for @abbreviatedSeptember.
no setter
abbreviatedSunday String
No description provided for @abbreviatedSunday.
no setter
abbreviatedThursday String
No description provided for @abbreviatedThursday.
no setter
abbreviatedTuesday String
No description provided for @abbreviatedTuesday.
no setter
abbreviatedWednesday String
No description provided for @abbreviatedWednesday.
no setter
buttonCancel String
No description provided for @buttonCancel.
no setter
buttonNext String
No description provided for @buttonNext.
no setter
buttonPrevious String
No description provided for @buttonPrevious.
no setter
buttonSave String
No description provided for @buttonSave.
no setter
colorAlpha String
No description provided for @colorAlpha.
no setter
colorBlue String
No description provided for @colorBlue.
no setter
colorGreen String
No description provided for @colorGreen.
no setter
colorHue String
No description provided for @colorHue.
no setter
colorLightness String
No description provided for @colorLightness.
no setter
colorPickerTabHEX String
No description provided for @colorPickerTabHEX.
no setter
colorPickerTabHSL String
No description provided for @colorPickerTabHSL.
no setter
colorPickerTabHSV String
No description provided for @colorPickerTabHSV.
no setter
colorPickerTabRecent String
No description provided for @colorPickerTabRecent.
no setter
colorPickerTabRGB String
No description provided for @colorPickerTabRGB.
no setter
colorRed String
No description provided for @colorRed.
no setter
colorSaturation String
No description provided for @colorSaturation.
no setter
colorValue String
No description provided for @colorValue.
no setter
commandActivate String
No description provided for @commandActivate.
no setter
commandEmpty String
No description provided for @commandEmpty.
no setter
commandMoveDown String
No description provided for @commandMoveDown.
no setter
commandMoveUp String
No description provided for @commandMoveUp.
no setter
commandSearch String
No description provided for @commandSearch.
no setter
dataTableColumns String
No description provided for @dataTableColumns.
no setter
dataTableNext String
No description provided for @dataTableNext.
no setter
dataTablePrevious String
No description provided for @dataTablePrevious.
no setter
dateDayAbbreviation String

Available on ShadcnLocalizations, provided by the ShadcnLocalizationsExtensions extension

The abbreviation for the day component (e.g., 'DD').
no setter
dateMonthAbbreviation String

Available on ShadcnLocalizations, provided by the ShadcnLocalizationsExtensions extension

The abbreviation for the month component (e.g., 'MM').
no setter
datePartsOrder List<DatePart>

Available on ShadcnLocalizations, provided by the ShadcnLocalizationsExtensions extension

The order of date parts for the current locale.
no setter
datePickerSelectYear String
No description provided for @datePickerSelectYear.
no setter
dateYearAbbreviation String

Available on ShadcnLocalizations, provided by the ShadcnLocalizationsExtensions extension

The abbreviation for the year component (e.g., 'YYYY').
no setter
durationDay String
No description provided for @durationDay.
no setter
durationHour String
No description provided for @durationHour.
no setter
durationMinute String
No description provided for @durationMinute.
no setter
durationSecond String
No description provided for @durationSecond.
no setter
formNotEmpty String
No description provided for @formNotEmpty.
no setter
formPasswordDigits String
No description provided for @formPasswordDigits.
no setter
formPasswordLowercase String
No description provided for @formPasswordLowercase.
no setter
formPasswordSpecial String
No description provided for @formPasswordSpecial.
no setter
formPasswordUppercase String
No description provided for @formPasswordUppercase.
no setter
formPhoneNumberEmpty String
No description provided for @formPhoneNumberEmpty.
no setter
formPhoneNumberInvalid String
No description provided for @formPhoneNumberInvalid.
no setter
hashCode int
The hash code for this object.
no setterinherited
invalidEmail String
No description provided for @invalidEmail.
no setter
invalidURL String
No description provided for @invalidURL.
no setter
invalidValue String
No description provided for @invalidValue.
no setter
localeName String
final
No description provided for @menuCopy.
no setter
No description provided for @menuCut.
no setter
No description provided for @menuDelete.
no setter
No description provided for @menuLiveTextInput.
no setter
No description provided for @menuPaste.
no setter
No description provided for @menuRedo.
no setter
No description provided for @menuSearchWeb.
no setter
No description provided for @menuSelectAll.
no setter
No description provided for @menuShare.
no setter
No description provided for @menuUndo.
no setter
monthApril String
No description provided for @monthApril.
no setter
monthAugust String
No description provided for @monthAugust.
no setter
monthDecember String
No description provided for @monthDecember.
no setter
monthFebruary String
No description provided for @monthFebruary.
no setter
monthJanuary String
No description provided for @monthJanuary.
no setter
monthJuly String
No description provided for @monthJuly.
no setter
monthJune String
No description provided for @monthJune.
no setter
monthMarch String
No description provided for @monthMarch.
no setter
monthMay String
No description provided for @monthMay.
no setter
monthNovember String
No description provided for @monthNovember.
no setter
monthOctober String
No description provided for @monthOctober.
no setter
monthSeptember String
No description provided for @monthSeptember.
no setter
placeholderColorPicker String
No description provided for @placeholderColorPicker.
no setter
placeholderDatePicker String
No description provided for @placeholderDatePicker.
no setter
placeholderDurationPicker String
No description provided for @placeholderDurationPicker.
no setter
placeholderTimePicker String
No description provided for @placeholderTimePicker.
no setter
refreshTriggerComplete String
No description provided for @refreshTriggerComplete.
no setter
refreshTriggerPull String
No description provided for @refreshTriggerPull.
no setter
refreshTriggerRefreshing String
No description provided for @refreshTriggerRefreshing.
no setter
refreshTriggerRelease String
No description provided for @refreshTriggerRelease.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeAM String
No description provided for @timeAM.
no setter
timeDaysAbbreviation String
No description provided for @timeDaysAbbreviation.
no setter
timeHour String
No description provided for @timeHour.
no setter
timeHoursAbbreviation String
No description provided for @timeHoursAbbreviation.
no setter
timeMinute String
No description provided for @timeMinute.
no setter
timeMinutesAbbreviation String
No description provided for @timeMinutesAbbreviation.
no setter
timePM String
No description provided for @timePM.
no setter
timeSecond String
No description provided for @timeSecond.
no setter
timeSecondsAbbreviation String
No description provided for @timeSecondsAbbreviation.
no setter

Methods

dataTableSelectedRows(int count, int total) String
No description provided for @dataTableSelectedRows.
formatDateTime(DateTime dateTime, {bool showDate = true, bool showTime = true, bool showSeconds = false, bool use24HourFormat = true}) String

Available on ShadcnLocalizations, provided by the ShadcnLocalizationsExtensions extension

Formats a DateTime object into a string.
formatDuration(Duration duration, {bool showDays = true, bool showHours = true, bool showMinutes = true, bool showSeconds = true}) String

Available on ShadcnLocalizations, provided by the ShadcnLocalizationsExtensions extension

Formats a Duration into a string.
formatNumber(double value) String

Available on ShadcnLocalizations, provided by the ShadcnLocalizationsExtensions extension

Formats a number as a string, removing decimal point if it's an integer.
formatTimeOfDay(TimeOfDay time, {bool use24HourFormat = true, bool showSeconds = false}) String

Available on ShadcnLocalizations, provided by the ShadcnLocalizationsExtensions extension

Formats a TimeOfDay object into a string.
formBetweenExclusively(double min, double max) String
No description provided for @formBetweenExclusively.
formBetweenInclusively(double min, double max) String
No description provided for @formBetweenInclusively.
formGreaterThan(double value) String
No description provided for @formGreaterThan.
formGreaterThanOrEqualTo(double value) String
No description provided for @formGreaterThanOrEqualTo.
formLengthGreaterThan(int value) String
No description provided for @formLengthGreaterThan.
formLengthLessThan(int value) String
No description provided for @formLengthLessThan.
formLessThan(double value) String
No description provided for @formLessThan.
formLessThanOrEqualTo(double value) String
No description provided for @formLessThanOrEqualTo.
getAbbreviatedMonth(int month) String

Available on ShadcnLocalizations, provided by the ShadcnLocalizationsExtensions extension

Gets the abbreviated month name for a given month index (1-12).
getAbbreviatedWeekday(int weekday) String

Available on ShadcnLocalizations, provided by the ShadcnLocalizationsExtensions extension

Gets the abbreviated weekday name for a given weekday index (1-7).
getColorPickerMode(ColorPickerMode mode) String

Available on ShadcnLocalizations, provided by the ShadcnLocalizationsExtensions extension

Gets the localized label for a ColorPickerMode.
getDatePartAbbreviation(DatePart part) String

Available on ShadcnLocalizations, provided by the ShadcnLocalizationsExtensions extension

Gets the abbreviation for a specific DatePart.
getDurationPartAbbreviation(DurationPart part) String

Available on ShadcnLocalizations, provided by the ShadcnLocalizationsExtensions extension

Gets the abbreviation for a DurationPart.
getMonth(int month) String

Available on ShadcnLocalizations, provided by the ShadcnLocalizationsExtensions extension

Gets the full month name for a given month index (1-12).
getTimePartAbbreviation(TimePart part) String

Available on ShadcnLocalizations, provided by the ShadcnLocalizationsExtensions extension

Gets the abbreviation for a TimePart.
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) ShadcnLocalizations

Constants

delegate → const LocalizationsDelegate<ShadcnLocalizations>
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.