Releases: slang-i18n/slang
Releases · slang-i18n/slang
fast_i18n v5.12.0
- feat: add comments feature for json and csv files
- feat: new command
flutter pub run fast_i18n:migrate arb en.arb en.json
to migrate ARB files
fast_i18n v5.11.0
- feat: new command
flutter pub run fast_i18n stats
to get number of words, characters, etc. - fix: create missing directories instead of throwing an error
fast_i18n v5.10.0
- feat: add option
locale_handling: false
to not generatet
andLocaleSettings
(suitable for dependency injection)
fast_i18n v5.9.0
Dependency Injection (optional)
Plural resolvers are now part of the translation class.
Meaning, you can now build your own instance without relying on LocaleSettings
or any other side effects.
This is entirely optional! You can still use the included LocaleSettings
solution.
// riverpod example
final english = AppLocale.en.build(cardinalResolver: myEnResolver);
final german = AppLocale.de.build(cardinalResolver: myDeResolver);
final translationProvider = StateProvider<StringsEn>((ref) => german);
// access the current instance
final t = ref.watch(translationProvider);
String a = t.welcome.title;
For more information, checkout the full article.
fast_i18n v5.8.0
- feat: allow custom parameter names in plurals or contexts (
count
andcontext
were hardcoded previously) - feat: add path comment to every generated class
fast_i18n v5.7.0
- feat: add option to disable timestamp generation (
timestamp: false
) - feat: add option to split output file (
output_format: multiple_files
) - perf: flat translation map now declared separately for each locale
fast_i18n v5.6.0
- feat: add CSV support
- feat: improve generic type detection for lists (e.g.
List<List<String>>
,List<Map<String, String>>
) - feat: make optional class members (from interfaces) non-nullable when possible
fast_i18n v5.5.0
Namespaces
Split your translations into different files. Each file represents a namespace:
i18n/
widgets/
- widgets.i18n.json
- widgets_fr.i18n.json
dialogs/
- dialogs.i18n.json
- dialogs_fr.i18n.json
Interfaces
Create common super classes for different nodes. This allows for more type safety. Instead of List<dynamic>
, we can have List<PageData>
{
"pages": [
{
"title": "E2E encryption",
"content": "Your data is safe!"
},
{
"title": "Sync",
"content": "Synchronize all your devices!"
}
]
}
With the generated mixin:
mixin PageData {
String get title;
String get content;
}
See updated README for further information about those features.
fast_i18n v5.4.0
- feat: add default plural resolvers for Spanish, French and Italian (Thanks to @SimoneBressan)
fast_i18n v5.3.0
- feat: handle linked translations with parameters