MapLocalizationLoader
A LocalizationLoader which can load translations from a map.
map must map a language code to a map of translations keys mapped to translations (i.e., a map of maps).
{
'en': {'header':'This is a header', ...},
'da': {'header':'Dette er en overskrift', ...},
}
- Implemented types
Constructors
MapLocalizationLoader
Create a MapLocalizationLoader based on the map.
Properties
map
The map between a language code and the localizations for this language.
The localizations of a language may be nested.
Methods
load
Load translations for locale.
The map may be nested, in which case it is flattened into dot-separated keys when merged - see AssetLocalizations.flatten. Returning a flat Map<String, String> remains valid.