PackageTrack
Sign in Get early access

slang_flutter

Flutter support for slang. This library provides helpful Flutter API.

4.19.0 235K downloads/mo #791 most downloaded on pub.dev source

What this package is like to depend on

Last release 17 days ago

06 Aug 2026

Ships fairly regularly

a new release about every 5 weeks

Nearly every release is documented

notes for 59 of 64 stable releases

2 versions withdrawn

withdrawn after publishing

4 years old

70 releases · first in 2022

12 releases in the last 12 months

see the full history below

Release timeline

70 releases · May 2022 to Aug 2026
2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 60 of 70
  1. 4.19.0 06 Aug 2026

    Nothing published for this version

  2. 4.18.0 30 Jun 2026

    Nothing published for this version

  3. 4.17.0 29 Jun 2026

    Nothing published for this version

  4. 4.16.0 11 Jun 2026
    Release notes
    • feat: respect all locale preferences of the device instead of only the first locale
    • feat: add --preserve-order flag to slang apply
    • fix: compilation error when using region extension as a super set of the parent locale
    Open source →
  5. 4.15.0 25 May 2026
    Release notes
    • feat: Region Extensions, de-CH will fall back to de before falling back to the base locale
    • feat: Wildcard Locales, [any]-DE.json will spread to all existing language codes, useful to set a currency for a region without managing every combination of language and region (e.g. en-DE, fr-DE, de-DE)
    • feat: add Arabic plural resolver
    Open source →
  6. 4.14.0 13 Mar 2026
    Release notes
    • feat: allow nested namespaces
    • feat: automatically fix common casing typos during slang wip apply based on existing translations and majority vote
    • feat(mcp): allow specifying @@notes in translation files to give LLMs more context
    Open source →
  7. 4.13.0 05 Mar 2026
    Release notes
    • feat: add generate_mixin to interfaces config to allow predefined mixins instead of generating new ones (#347)
    • feat: support build_runner build --workspace, requires build_runner: ^2.12.1 (#348)
    • deps: replace csv with serial_csv
    • DEPRECATED: Do not specify paths for interfaces in config, use interface modifier in the translation keys instead (e.g. myKey(interface=MyInterface))
    Open source →
  8. 4.12.1 31 Jan 2026
    Release notes
    Open source →
  9. 4.12.0 18 Jan 2026
    Release notes
    • feat: announcing slang_mcp, a new package to work with LLMs more efficiently
    • fix: $wip should handle nested parenthesis
    Open source →
  10. 4.11.0 22 Nov 2025
    Release notes
    • feat: add t.$wip('Welcome $name') or t.$wip.welcome.title('Welcome $name') for key-less prototyping without code generation
    • feat: add dart run slang wip apply to add the translations to resources and update the Dart code accordingly
    • feat: generate the flat map in a single function (#325) @mrgnhnt96
    Open source →
    Release notes
    • feat: simplify ${arg} to $arg if possible
    • feat: make internal translation class instance final
    Open source →
  11. 4.10.0 11 Nov 2025
    Release notes
    • feat: add // dart format off for generated files (#320) @adil192
    • feat: flat map uses switch expressions instead of statements (#323) @mrgnhnt96
    Open source →
    Release notes

    Added support for custom contexts.
    Example:

    {
      "greet": {
        "male": "Hello Mr $name",
        "female": "Hello Ms $name"
      }
    }
    
    String a = t.greet(name: 'Anna', context: GenderContext.female);
    

    For more information, see README.

    Open source →
  12. 4.9.0 04 Oct 2025
    Release notes
    • feat: combine namespaced and non-namespaced translations (#311)
    • feat: reduce CLI logging (#315)
    Open source →
    Release notes

    Detect pluralization automatically, configure it via pluralization->auto: cardinal / ordinal

    Open source →
  13. 4.8.0 01 Aug 2025
    Release notes
    • feat: add autodoc feature enabled by default that generates the base translation as documentation for the translation keys (#218)
    • feat: slang analyze supports --source-dirs (#309) @khoadng
    • feat: slang configure supports --source-dirs (#308) @khoadng
    • fix: correctly preserve identation of YAML output (#299) @adil192
    • deps: loosen build constraint in slang_build_runner
    Open source →
    Release notes
    • feat: add option to turn off flat map generation via flat_map: false
    • feat: add fallback_strategy configuration, possible values strict (default), base_locale
    • feat: auto rebuild flutter pub run fast_i18n watch (experimental)
    • fix: escape parameters with backslash correctly
    Open source →
  14. 4.7.0 13 Apr 2025
    Release notes
    • feat: remove json2yaml dependency, reimplement a simple opinionated YAML writer
    Open source →
  15. 4.6.0 19 Mar 2025
    Release notes
    • feat: add Translations.$copyWith() and TranslationMetadata.getOverride to allow adding custom behavior (#287)
    • feat: add Japanese plural resolver (#289)
    Open source →
  16. 4.5.0 26 Feb 2025
    Release notes
    • feat: add dart run slang configure to configure CFBundleLocalizations in Info.plist based on existing translation files
    • feat: add -h / --help / help command
    • feat: add global generate_enum config (#283)
    • fix: add unused_element_parameter to avoid warnings in Dart 3.7 (#282)
    Open source →
    Release notes
    • feat: remove hint when overriding plural resolvers (were too verbose)
    • feat: generated plural resolvers fallback to default quantity if null
    • feat: add zero quantity to cs, de, en and vi (not breaking)
    • docs: it is now recommended to put this library into dev_dependencies
    Open source →
  17. 4.4.0 15 Dec 2024
    Release notes
    • feat: add (fallback) modifier to fallback entries within a map (#268)
    • fix: empty strings in base translations should not be removed when using fallback_strategy: base_locale_empty_string
    Open source →
    Release notes
    • feat: add Flutter 1.x.x support, build_runner detects this automatically, otherwise set null_safety: false in build.yaml
    • feat: flutter pub run fast_i18n ignores build.yaml files without fast_i18n entry
    • fix: add type hint for _renderedResolvers
    Open source →
  18. 4.3.0 29 Nov 2024
    Release notes
    • feat: simplify file names without namespaces (#267)
    • DEPRECATED: Do not use namespaces in file names when namespaces are disabled: strings_de.json -> de.json
    • DEPRECATED: Always specify the locale in the file name (namespace enabled): strings.json -> strings_en.json, except the locale is specified in the directory name

    Note: This might make the files order in your IDE less pleasant if input and output files are in the same directory.
    You can specify the output directory to a subdirectory to avoid this.
    For example, output_directory: lib/i18n/gen

    Open source →
    Release notes
    • feat: plural resolvers can now be overwritten
    • fix: make params distinct
    • fix: sort locales correctly (base first, then alphabetically)
    Open source →
  19. 4.2.0 15 Nov 2024
    Release notes
    • feat: automatically sanitize invalid keys (e.g. continue, 123) (#257)
    • fix: do not override locale in L10n format definition
    Open source →
    Release notes
    • feat: add pluralization support
    • feat: AppLocale has a new property called flutterLocale
    • feat: new command flutter pub run fast_i18n which is much faster than flutter pub run build_runner build --delete-conflicting-outputs
    Open source →
  20. 4.1.0 23 Oct 2024
    Release notes
    • feat: add format config to automatically format generated files (#184)
    • fix: correctly generate with enum_name and class_name different from AppLocale / Translations (#254)
    Open source →
    Release notes

    A rebuild is needed: flutter pub run build_runner build.

    • feat: the generated file is now self-contained, it works even if you remove this library!
    • feat: add stats and timestamp to the generated file
    • fix: parse files with underscore only (e.g. strings_en_US)
    • fix: parse files with script tag (e.g. strings_zh-Hant-TW)
    • perf: generate LocaleSettings.supportedLocales statically without library call
    • perf: remove switch call in Translations.of(context).
    • docs: updates in generated file
    • docs: update README
    Open source →
  21. 4.0.0 21 Oct 2024
    Release notes

    DateFormat, NumberFormat, and Lazy loading

    Format translations with DateFormat and NumberFormat:

    Hello {name}, today is {today: yMd}. You have {money: currency(symbol: '€')}.

    On web, Deferred loading is used to reduce initial load time.

    • feat: add DateFormat and NumberFormat support (#112)
    • feat: add lazy: true config which is enabled by default (#135)
    • fix: slang analyze should not treat translations as unused if they are used in linked translations (#231)
    • fix: slang analyze should detect missing enums (#234)
    • fix: trim enum keys in compressed format while parsing (e.g. "male, female": "..." to "male,female": "...") (#247)
    • fix: compilation error on web when using large interfaces (#251)
    • fix: correctly transform keys with modifiers when key_case is set (#253)
    • Breaking: Require Dart 3.3 and Flutter 3.19
    • Breaking: setLocale, setLocaleRaw, and useDeviceLocale returns a Future, use -Sync suffix for synchronous calls
    • Breaking: output_format removed, always generates multiple files now
    • Breaking: deprecated functions in LocaleSettings (supportedLocales, supportedLocalesRaw) removed
    • Breaking: defining contexts (enums) is no longer allowed in build.yaml or slang.yaml (deprecated in v3.19.0)
    • Breaking: enums specified in context are no longer transformed into pascal case keeping the original case

    You can read the detailed migration guide here.

    Open source →
    Release notes

    The typed version is now first class.

    • Breaking: setLocale -> setLocaleRaw, setLocaleTyped -> setLocale
    • Breaking: locales -> supportedLocalesRaw
    • Breaking: AppLocale.toLanguageTag -> AppLocale.languageTag
    • Breaking: translation classes are now private by default, you can configure it via translation_class_visibility in build.yaml (in most cases just keep it private!)
    • plain strings are now implemented using getters, edit -> rebuild i18n -> hot reload works now for faster development
    Open source →
  22. 4.0.0-dev.0 21 Oct 2024 pre-release

    Nothing published for this version

  23. 3.32.0 01 Oct 2024

    Nothing published for this version

  24. 3.31.0 23 May 2024
    Release notes
    • feat: add dart run slang normalize to normalize translations based on base locale @Tienisto
    • feat: add parameter type support (introduced 3.30.0) to ARB files (#214) @Tienisto
    • feat: sort translation files for reproducible console output (#210) @poppingmoon
    Open source →
  25. 3.30.0 03 Mar 2024
    Release notes
    • feat: add parameter types (e.g. Hello {name: String}, you are {age: int} years old); is Object by default @Tienisto
    • fix: handle nested interfaces (#191) @Tienisto
    • refactor: move code to src folder @Tienisto
    Open source →
  26. 3.29.0 21 Jan 2024
    Release notes
    • feat: dart run slang analyze supports csv files (#185) @nikaera
    • feat: also add linter and coverage ignore to part files (#188) @cmenkemeller
    • fix: generate base translations as fallback when using context enums where some enum values are missing (#182) @Tienisto
    • fix: generate correct part of directive when using a custom dart file extension (#187) @cmenkemeller
    Open source →
  27. 3.28.0 21 Dec 2023
    Release notes
    • feat: add fallback_strategy: base_locale_empty_string to also treat empty strings as missing translations (#180)
    • fix: special case where linked translations had invalid parenthesis (#181)
    Open source →
  28. 3.27.0 16 Dec 2023
    Release notes
    • feat: add support for ARB files (#179)
    Open source →
  29. 3.26.2 07 Dec 2023
    Release notes
    • fix: should not escape special characters when parsed via the "Translation Overrides" feature (#177)
    Open source →
  30. 3.26.1 04 Dec 2023
    Release notes
    • fix: generate correct compatibility typedef for Translations class (#176)
    Open source →
  31. 3.26.0 04 Dec 2023
    Release notes
    • feat: base translation class is named Translations so that Translations.of(context) returns the same type (#169)
    • feat: the name Translations can be configured via class_name (@bjernie, #174)
    • feat: add statistics configuration (similar to timestamp) to hide statistics in generated file
    Open source →
  32. 3.25.0 16 Oct 2023
    Release notes
    • feat: add dart run slang clean to remove unused translations after running slang analyze (#141)
    • feat: add --exit-if-changed to slang analyze to fail CI if there are missing / unused translations (#141)
    • fix: code generator should not crash if context is not included in i18n (#165)
    • fix: should not generate contextBuilder and nBuilder parameter in rich text if not needed (#168)
    Open source →
  33. 3.24.0 27 Sep 2023
    Release notes
    • feat: slang edit add respects order in base locale (@adil192)
    • feat: slang edit add works without a specified locale, it will add the string to all locales
    • feat: use WidgetsBinding.instance.platformDispatcher instead of PlatformDispatcher.instance in findDeviceLocale implementation
    • fix: correctly obfuscate line breaks and single quotes
    Open source →
  34. 3.23.0 18 Aug 2023
    Release notes
    • feat: support multiple TranslationProvider at the same time when using multiple packages
    • fix: trailing slash in config does not work with build_runner
    • i18n: Swedish plural resolver improvement

    Contributions

    • fix: Handle negative values properly in Swedish. (#156) @lohnn
    Open source →
  35. 3.22.0 25 Jul 2023
    Release notes
    • feat: announcing slang_gpt, a new package to generate translations with GPT
    Open source →
  36. 3.21.0 17 Jul 2023
    Release notes
    • feat: add input directory as comment to generated files
    • fix: migrate away from deprecated WidgetsBinding.instance.window in findDeviceLocale implementation
    • fix: handle empty maps in _missing_translations in yaml format (#152) (by @adil192)
    Open source →
  37. 3.20.0 09 Jul 2023
    Release notes
    • feat: add slang edit add (short: slang add) to add new translations (#150) (by @adil192)
    Open source →
  38. 3.19.0 21 Jun 2023
    Release notes
    • feat: add enum value inference (no need to specify enum in the config anymore)
    • feat: add slang edit copy to copy translations
    • feat: namespaces may contain underscores if at least one file of same directory uses locale from directory name
    • DEPRECATED: Use explicit context modifier instead of relying on the config file (see migration guide)
    Open source →
  39. 3.18.0 01 Jun 2023
    Release notes
    • feat: add slang edit to move or delete translations over all locales
    • fix: avoid infinite loop of symlinks
    Open source →
  40. 3.17.0 02 May 2023
    Release notes
    • fix: setLocale does not work when Locale enum is from two packages (by @fzyzcjy)
    • fix: slang outdated should skip missing translations instead of throwing an error
    Open source →
  41. 3.16.0 13 Apr 2023
    Release notes
    • feat: add obfuscation config to obfuscate translation strings
    Open source →
  42. 3.15.0 29 Mar 2023
    Release notes
    • feat: add OUTDATED modifier to flag translations as outdated (slang analyze will treat them as missing)
    • feat: run flutter pub run slang outdated my.key.path to flag translations as outdated
    • feat: slang apply prefers modifiers from base locale over secondary locales
    Open source →
  43. 3.14.0 14 Mar 2023
    Release notes
    • feat: LocaleSettings.useDeviceLocale listens to device locale changes
    • feat: flutter pub run slang apply only applies changed locales by default
    • fix: locale selection with script code (e.g. zh-Hant-TW uses zh-TW instead of zh-HK)
    Open source →
  44. 3.13.0 25 Feb 2023
    Release notes
    • feat: generated files from analyze and apply have \n at the end of the file
    Open source →
  45. 3.12.0 13 Feb 2023
    Release notes
    • feat: mixins generated by the interface feature have == and hashCode overrides
    • feat: flutter pub run slang apply respects the order in the base locale instead of simply add the new translations to the end
    • feat: flutter pub run slang analyze have --split-missing and --split-unused (in addition to --split) so only one of both can be a single file
    Open source →
  46. 3.11.0 02 Feb 2023
    Release notes
    • feat: add (ignoreMissing) and (ignoreUnused) modifiers which changes the behaviour of flutter pub run slang analyze
    Open source →
  47. 3.10.0 28 Jan 2023
    Release notes
    • feat: there is now a default plural resolver so the app keeps working in production when you forgot to define one, you will only see a warning in the log
    • fix: key_map_case should work with (map) modifier
    Open source →
  48. 3.9.0 19 Jan 2023
    Release notes
    • feat: improve interface attribute inference algorithm
    • feat: generate to lib/gen/<filename> in Flutter environment by default if input is outside of lib/ and no output directory is given
    Open source →
  49. 3.8.0 17 Jan 2023
    Release notes
    • feat: add (interface=<Interface>) and (singleInterface=<Interface>) modifiers, a new approach to configure interfaces without touching the config file
    • feat: add AppLocaleUtils.supportedLocales and AppLocaleUtils.supportedLocalesRaw, this API works in locale_handling: false
    • fix: possible class name conflict for objects inside lists
    • DEPRECATED: LocaleSettings.supportedLocales and LocaleSettings.supportedLocalesRaw
    Open source →
  50. 3.7.0 19 Dec 2022
    Release notes
    • feat: official web support
    Open source →
  51. 3.6.0 15 Dec 2022
    Release notes
    • feat: RichText supports links inside default translation
    • feat: flutter pub run slang watch works recursively and does not crash on error
    Open source →
  52. 3.5.0 24 Nov 2022
    Release notes
    • feat: csv decoding now support both CRLF and LF, " and '
    • fix: LocaleSettings.setPluralResolver should not throw an assertion error
    • fix: flutter pub run slang migrate should also work without : in command
    Open source →
  53. 3.4.0 12 Nov 2022
    Release notes
    • feat: add --locale=<locale> argument to flutter pub run slang apply to only apply a specific locale
    • BREAKING (TOOL): --flat argument for flutter pub run slang analyze and apply is no longer available
    Open source →
  54. 3.3.0 29 Oct 2022
    Release notes
    • feat: flutter pub run slang analyze now also checks unused translations (on top of missing translations)
    • docs: prefer slang analyze over slang:analyze (and for all other commands); both styles are supported however
    Open source →
  55. 3.2.0 27 Oct 2022
    Release notes
    • feat: add command flutter pub run slang:apply to add translations from the slang:analyze result
    • fix: handle isFlatMap parameter when overriding translations correctly
    • fix: update arb migration tool to respect new modifier syntax
    Open source →
  56. 3.1.0 08 Oct 2022
    Release notes
    • feat: add command flutter pub run slang:analyze to report missing translations
    Open source →
  57. 3.0.0 20 Sep 2022
    Release notes

    Translation Overrides and Enhanced Modifiers

    • feat: it is now possible to override translations via LocaleSettings.overrideTranslations (checkout updated README)
    • feat: there is a new modifier syntax which allows for multiple modifiers e.g. myKey(plural, rich)
    • feat: improve file scan (now only checks top-level directory for any config files)
    • Breaking: default plural parameter is now n; you can revert this by setting pluralization/default_parameter: count
    • Breaking: custom plural/context parameter must follow syntax apples(param=appleCount)

    All breaking changes will result in a compile-time error, so don't worry for "hidden" bugs :)

    You can read the detailed migration guide here.

    Open source →
    Release notes

    New Features:

    • null safety support
    • add type-safe functions LocaleSettings.setLocaleTyped and LocaleSettings.currentLocaleTyped

    Breaking:

    • output_translate_var renamed to translate_var in build.yaml config file
    Open source →
  58. 3.0.0-dev.0 19 Sep 2022 pre-release

    Nothing published for this version

  59. 2.8.0 16 Sep 2022
    Release notes
    • feat: add AppLocaleUtils.parseLocaleParts
    • fix: LocaleSettings.useDeviceLocale now does not complain of weird locales on Linux
    • fix: rich text now handles all characters
    • fix: rich text properly applies param_case
    • fix: empty nodes are rendered as classes instead of claiming them as plurals
    Open source →
  60. 2.7.0 08 Aug 2022
    Release notes
    • feat: ignore empty plural / context nodes when fallback_strategy: base_locale is used
    • feat: add coverage:ignore-file to generated file and ignore every lint
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive