Releases: slang-i18n/slang
Releases · slang-i18n/slang
fast_i18n v3.0.1
- add real project example
- update FAQ in README
- depend on null-safety version of recase package
fast_i18n v3.0.0
New Features:
- null safety support
- add type-safe functions
LocaleSettings.setLocaleTyped
andLocaleSettings.currentLocaleTyped
Breaking:
output_translate_var
renamed totranslate_var
inbuild.yaml
config file
fast_i18n v2.3.1
Bug Fix:
- make locales case sensitive to comply with
MaterialApp
'ssupportedLocales
.
fast_i18n v2.3.0
New Feature:
- Add
supportedLocales
property that can be used to fillMaterialApp
'ssupportedLocales
argument.
fast_i18n v2.2.1
Bug Fix:
- compilation error occurring when non-standard name (not 'strings.i18n.json') is used for json files (thanks to @Pavel-Sulimau)
fast_i18n v2.2.0
New config: output_translate_var
, renames default t
variable
Internal: device locale now fetched via Platform.localeName
fast_i18n v2.1.0
A rebuild is needed: flutter pub run build_runner build
.
- API change: LocaleSettings.useDeviceLocale() is no longer asynchronous, now returns the new locale (
Future<void> -> String
) - API change: LocaleSettings.setLocale(locale) now also returns the new locale (
void -> String
)
Just in case you use internal API:
FastI18n.findDeviceLocale has been renamed to FastI18n.getDeviceLocale
fast_i18n v2.0.0
Thanks to @DenchikBY.
- Now it's possible to set in and out directories for files.
- You can set the pattern by which to search for files.
- Generated keys can be switched to another case in generated classes.
- Removed dependency on devicelocale.
- Configs with baseLocale and maps moved from config.i18n.json to build.yaml
- Generators replaced with fields for keys with static values.
- Arguments now can be wrapped with braces like ${key}.
- Removed deprecated
#map
mode (deprecated in 1.5.0)
Example of new config in build.yaml:
targets:
$default:
builders:
fast_i18n:i18nBuilder:
options:
base_locale: en
input_directory: lib/i18n
input_file_pattern: .i18n.json
output_directory: lib/i18n
output_file_pattern: .g.dart
key_case: snake
maps:
- a
- b
- c.d
fast_i18n v1.8.2
Hotfix:
possible NPE when calling Translations.of(context)
fast_i18n v1.8.1
Hotfix:
possible NPE error when calling LocaleSettings.useDeviceLocale or LocaleSettings.setLocale