BsLocalizations class

Localization class for Bootstrap UI Flutter.

It loads JSON translation files from the assets dynamically based on the app's current locale.

Constructors

BsLocalizations(Locale locale)
Creates a BsLocalizations for the given locale.

Properties

carouselContainer String
Resolves the screen reader label for the carousel's container description.
no setter
carouselNext String
Resolves the screen reader label for the carousel's next control.
no setter
carouselPrev String
Resolves the screen reader label for the carousel's previous control.
no setter
errorPrefix String
Resolves the validation error prefix.
no setter
hashCode int
The hash code for this object.
no setterinherited
locale Locale
The active locale.
final
progressBar String
Resolves the screen reader label for the progress bar.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spinner String
Resolves the screen reader label for the spinner status.
no setter

Methods

carouselIndicator(int index) String
Resolves the screen reader label for a carousel slide indicator.
load() Future<bool>
Loads the localized JSON assets.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
translate(String key, {String? fallback}) String
Translates a key using the loaded translations, falling back to fallback or the key itself.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

of(BuildContext context) BsLocalizations?
Retrieves the BsLocalizations instance from the given BuildContext.

Constants

delegate → const LocalizationsDelegate<BsLocalizations>
The localization delegate instance.