CPLocalizations
Localization support for Cognition Package using LocalizationLoader configurations.
Use translate to translate any text, like this:
CPLocalizations.of(context).translate('key');
- Inheritance
-
- Object
- AssetLocalizations
- CPLocalizations
Constructors
CPLocalizations
- Locale locale
Create a localization based on locale.
Constants
assetPath
Properties
delegate
getter/setter pair
A default LocalizationsDelegate for CPLocalizations.
staticAssetName
The name of the static localization asset.
Methods
load
Load the translations for Cognition Package.
The translations consists of the static names in the package as provided in staticAssetName.
of
- BuildContext context
override
Returns the localized resources object of type CPLocalizations for the widget tree that corresponds to the given context.
Returns null if no resources object of type CPLocalizations exists within the given context.