RPLocalizations
Localization support for Research Package using LocalizationLoader configurations.
Use translate to translate any text, like this:
RPLocalizations.of(context).translate('key');
- Inheritance
-
- Object
- AssetLocalizations
- RPLocalizations
Constructors
RPLocalizations
- Locale locale
Create a localization based on locale.
Constants
assetPath
Properties
delegate
A default LocalizationsDelegate for RPLocalizations.
This default delegate loads translations from the assets/lang file path.
staticAssetName
The name of the static localization asset.
Methods
load
- List<
LocalizationLoader> loaders = const [],
Load the translations for Research Package.
The translations is a combination of the static names in the package as provided in staticAssetName combined with translations of the any text provided by the loaders, which knows how to load translations.
of
- BuildContext context
Returns the localized resources object of type RPLocalizations for the widget tree that corresponds to the given context.
Returns null if no resources object of type RPLocalizations exists within the given context.