KareeInternationalization class
KareeInternationalization: Class that provides internationalization for
your Karee applications.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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 Properties
-
appLocalization
→ Of<
AppLocalization> -
@get appLocalization
no setter
- currentLocale → Locale?
-
@get currentLocale
no setter
- i18n ↔ bool
-
This is used to enable or disable i18n in Karee.
If set to
true, Karee will load the translation file from the resources/i18n directory. If set tofalse, Karee will not load any translation file and will not apply any translation. This is useful for applications that do not require internationalization. If you want to use i18n, set this totruein yourKareeMaterialApporKareeModuleinitialization. Default isfalse.getter/setter pair
Static Methods
-
changeLanguage(
Locale locale) → void - KareeInternationalization.changeLanguage
-
init(
Locale locale, List< Locale> supportedLocale, [bool enableI18n = false]) → Future<void> -
Only for internal call.
AppLocalization.initis a static function used to initialize the appLocalization instance in Karee framework. -
initAppLocalization(
) → Of< AppLocalization> -
This function is used to initialize appLocalization. This function is
called both in KareeMaterialApp and KareeModule.initialize(). Because
_appLocalizationis marked as late and is called in two places, it's important to avoidLateInitializationError. Karee will surround it with a try-catch structure.