FileTranslationLoader class
Loads translation files from JSON, YAML or XML format
- Inheritance
-
- Object
- TranslationLoader
- FileTranslationLoader
- Implemented types
- Implementers
Constructors
- FileTranslationLoader({String basePath = "assets/i18next", bool useCountryCode = false, dynamic decodeStrategies})
Properties
- assetBundle → AssetBundle
-
final
- basePath → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- useCountryCode → bool
-
final
Methods
-
composeCountryCode(
Locale locale) → String - Return the country code to attach to the file name, if required
-
composeFileName(
Locale locale) → String - Compose the file name using the format languageCode_countryCode
-
load(
Locale locale) → Future< Map?> -
Return the translation Map
override
-
loadFile(
String fileName) → Future< Map?> - Load the fileName using one of the strategies provided
-
loadString(
String fileName, String extension) → Future< String> -
Load the file using the AssetBundle rootBundle
override
-
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