24 lines
1.1 KiB
Dart
24 lines
1.1 KiB
Dart
/// The i18n works as follows:
|
|
/// 1. The i18n file is loaded from a source.
|
|
/// - The i18n file is loaded from the assets folder.
|
|
/// - The i18n file can be in json, yaml or ARB format.
|
|
/// - The i18n file must contain a `@@locale` key with the locale code.
|
|
/// - The i18n file must be named `i18n.<locale>.<extension>`.
|
|
/// - The i18n file is loaded from a network source.
|
|
/// - The i18n file can be in json, yaml or ARB format.
|
|
/// - The i18n file must contain a `@@locale` key with the locale code.
|
|
/// - The assets folder must contain a `i18n.<locale>.<extension>` or
|
|
/// `i18n.<extension>` files used as a fallback.
|
|
/// 2. The i18n file is parsed and the locale is extracted.
|
|
/// 3. The i18n file is added to the i18n map.
|
|
/// 4. The i18n map is provided to the app.
|
|
///
|
|
/// The i18n map can be reloaded by calling the `reload` method.
|
|
/// This will reload the i18n file from the source and update the i18n map.
|
|
/// And update any widgets that are listening to the i18n map.
|
|
///
|
|
/// A top level BLoC is used to provide the i18n map to the app.
|
|
void main() {
|
|
|
|
}
|