Skip to content

Releases: slang-i18n/slang

fast_i18n v5.12.0

18 Mar 17:20
23b0d94
Compare
Choose a tag to compare
  • 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

20 Feb 15:54
1b4a564
Compare
Choose a tag to compare
  • 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

09 Feb 01:23
9a155d5
Compare
Choose a tag to compare
  • feat: add option locale_handling: false to not generate t and LocaleSettings (suitable for dependency injection)

fast_i18n v5.9.0

19 Jan 20:23
2a2c3b0
Compare
Choose a tag to compare

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

09 Jan 14:45
7100522
Compare
Choose a tag to compare
  • feat: allow custom parameter names in plurals or contexts (count and context were hardcoded previously)
  • feat: add path comment to every generated class

fast_i18n v5.7.0

18 Dec 20:45
6991223
Compare
Choose a tag to compare
  • 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

09 Dec 22:19
f3abd1e
Compare
Choose a tag to compare
  • 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

28 Nov 23:01
30f6161
Compare
Choose a tag to compare

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

23 Oct 13:39
cdab5a6
Compare
Choose a tag to compare
  • feat: add default plural resolvers for Spanish, French and Italian (Thanks to @SimoneBressan)

fast_i18n v5.3.0

16 Oct 15:18
7b9a0b1
Compare
Choose a tag to compare
  • feat: handle linked translations with parameters