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 2026Releases
latest 60 of 70-
4.19.006 Aug 2026Nothing published for this version
-
4.18.030 Jun 2026Nothing published for this version
-
4.17.029 Jun 2026Nothing published for this version
-
4.16.011 Jun 2026Release notes
Open source →- feat: respect all locale preferences of the device instead of only the first locale
- feat: add
--preserve-orderflag toslang apply - fix: compilation error when using region extension as a super set of the parent locale
-
4.15.025 May 2026Release notes
Open source →- feat: Region Extensions,
de-CHwill fall back todebefore falling back to the base locale - feat: Wildcard Locales,
[any]-DE.jsonwill 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
- feat: Region Extensions,
-
4.14.013 Mar 2026Release notes
Open source →- feat: allow nested namespaces
- feat: automatically fix common casing typos during
slang wip applybased on existing translations and majority vote - feat(mcp): allow specifying
@@notesin translation files to give LLMs more context
-
4.13.005 Mar 2026Release notes
Open source →- feat: add
generate_mixinto interfaces config to allow predefined mixins instead of generating new ones (#347) - feat: support
build_runner build --workspace, requiresbuild_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))
- feat: add
-
4.12.131 Jan 2026Release notes
Open source →- feat: also format base locale when running
slang normalize(#344) @adil192 - feat: format yaml files like in Weblate (#343) @adil192
- chore: migrate from GitHub to Codeberg: https://codeberg.org/Tienisto/slang
- feat: also format base locale when running
-
4.12.018 Jan 2026Release notes
Open source →- feat: announcing slang_mcp, a new package to work with LLMs more efficiently
- fix: $wip should handle nested parenthesis
-
4.11.022 Nov 2025Release notes
Open source →- feat: add
t.$wip('Welcome $name')ort.$wip.welcome.title('Welcome $name')for key-less prototyping without code generation - feat: add
dart run slang wip applyto add the translations to resources and update the Dart code accordingly - feat: generate the flat map in a single function (#325) @mrgnhnt96
Release notes
Open source →- feat: simplify
${arg}to$argif possible - feat: make internal translation class instance final
- feat: add
-
4.10.011 Nov 2025Release notes
Open source →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.
-
4.9.004 Oct 2025Release notes
Open source →Release notes
Open source →Detect pluralization automatically, configure it via pluralization->auto: cardinal / ordinal
-
4.8.001 Aug 2025Release notes
Open source →- feat: add
autodocfeature enabled by default that generates the base translation as documentation for the translation keys (#218) - feat:
slang analyzesupports--source-dirs(#309) @khoadng - feat:
slang configuresupports--source-dirs(#308) @khoadng - fix: correctly preserve identation of YAML output (#299) @adil192
- deps: loosen
buildconstraint inslang_build_runner
Release notes
Open source →- feat: add option to turn off flat map generation via
flat_map: false - feat: add
fallback_strategyconfiguration, possible valuesstrict(default),base_locale - feat: auto rebuild
flutter pub run fast_i18n watch(experimental) - fix: escape parameters with backslash correctly
- feat: add
-
4.7.013 Apr 2025Release notes
Open source →- feat: remove
json2yamldependency, reimplement a simple opinionated YAML writer
- feat: remove
-
4.6.019 Mar 2025 -
4.5.026 Feb 2025Release notes
Open source →- feat: remove hint when overriding plural resolvers (were too verbose)
- feat: generated plural resolvers fallback to default quantity if null
- feat: add
zeroquantity tocs,de,enandvi(not breaking) - docs: it is now recommended to put this library into
dev_dependencies
-
4.4.015 Dec 2024Release notes
Open source →- 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
Release notes
Open source →- feat: add Flutter 1.x.x support, build_runner detects this automatically, otherwise set
null_safety: falseinbuild.yaml - feat:
flutter pub run fast_i18nignoresbuild.yamlfiles without fast_i18n entry - fix: add type hint for
_renderedResolvers
- feat: add
-
4.3.029 Nov 2024Release notes
Open source →- 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/genRelease notes
Open source →- feat: plural resolvers can now be overwritten
- fix: make params distinct
- fix: sort locales correctly (base first, then alphabetically)
-
4.2.015 Nov 2024Release notes
Open source →- feat: automatically sanitize invalid keys (e.g.
continue,123) (#257) - fix: do not override
localein L10n format definition
Release notes
Open source →- feat: add pluralization support
- feat:
AppLocalehas a new property calledflutterLocale - feat: new command
flutter pub run fast_i18nwhich is much faster thanflutter pub run build_runner build --delete-conflicting-outputs
- feat: automatically sanitize invalid keys (e.g.
-
4.1.023 Oct 2024Release notes
Open source →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.supportedLocalesstatically without library call - perf: remove switch call in
Translations.of(context). - docs: updates in generated file
- docs: update README
-
4.0.021 Oct 2024Release notes
Open source →DateFormat, NumberFormat, and Lazy loading
Format translations with
DateFormatandNumberFormat:Hello {name}, today is {today: yMd}. You have {money: currency(symbol: '€')}.On web, Deferred loading is used to reduce initial load time.
- feat: add
DateFormatandNumberFormatsupport (#112) - feat: add
lazy: trueconfig which is enabled by default (#135) - fix:
slang analyzeshould not treat translations as unused if they are used in linked translations (#231) - fix:
slang analyzeshould 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_caseis set (#253) - Breaking: Require Dart 3.3 and Flutter 3.19
- Breaking:
setLocale,setLocaleRaw, anduseDeviceLocalereturns a Future, use-Syncsuffix for synchronous calls - Breaking:
output_formatremoved, always generates multiple files now - Breaking: deprecated functions in
LocaleSettings(supportedLocales,supportedLocalesRaw) removed - Breaking: defining contexts (enums) is no longer allowed in
build.yamlorslang.yaml(deprecated in v3.19.0) - Breaking: enums specified in
contextare no longer transformed into pascal case keeping the original case
You can read the detailed migration guide here.
Release notes
Open source →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_visibilityinbuild.yaml(in most cases just keep it private!) - plain strings are now implemented using getters,
edit -> rebuild i18n -> hot reloadworks now for faster development
- feat: add
-
4.0.0-dev.021 Oct 2024 pre-releaseNothing published for this version
-
3.32.001 Oct 2024Nothing published for this version
-
3.31.023 May 2024Release notes
Open source →- feat: add
dart run slang normalizeto 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
- feat: add
-
3.30.003 Mar 2024 -
3.29.021 Jan 2024Release notes
Open source →- feat:
dart run slang analyzesupports 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 ofdirective when using a custom dart file extension (#187) @cmenkemeller
- feat:
-
3.28.021 Dec 2023 -
3.27.016 Dec 2023 -
3.26.207 Dec 2023Release notes
Open source →- fix: should not escape special characters when parsed via the "Translation Overrides" feature (#177)
-
3.26.104 Dec 2023Release notes
Open source →- fix: generate correct compatibility typedef for
Translationsclass (#176)
- fix: generate correct compatibility typedef for
-
3.26.004 Dec 2023 -
3.25.016 Oct 2023Release notes
Open source →- feat: add
dart run slang cleanto remove unused translations after runningslang analyze(#141) - feat: add
--exit-if-changedtoslang analyzeto 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
contextBuilderandnBuilderparameter in rich text if not needed (#168)
- feat: add
-
3.24.027 Sep 2023Release notes
Open source →- feat:
slang edit addrespects order in base locale (@adil192) - feat:
slang edit addworks without a specified locale, it will add the string to all locales - feat: use
WidgetsBinding.instance.platformDispatcherinstead ofPlatformDispatcher.instanceinfindDeviceLocaleimplementation - fix: correctly obfuscate line breaks and single quotes
- feat:
-
3.23.018 Aug 2023Release notes
Open source →- feat: support multiple
TranslationProviderat 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
- feat: support multiple
-
3.22.025 Jul 2023Release notes
Open source →- feat: announcing slang_gpt, a new package to generate translations with GPT
-
3.21.017 Jul 2023 -
3.20.009 Jul 2023Release notes
Open source → -
3.19.021 Jun 2023Release notes
Open source →- feat: add enum value inference (no need to specify
enumin the config anymore) - feat: add
slang edit copyto copy translations - feat: namespaces may contain underscores if at least one file of same directory uses locale from directory name
- DEPRECATED: Use explicit
contextmodifier instead of relying on the config file (see migration guide)
- feat: add enum value inference (no need to specify
-
3.18.001 Jun 2023Release notes
Open source →- feat: add
slang edittomoveordeletetranslations over all locales - fix: avoid infinite loop of symlinks
- feat: add
-
3.17.002 May 2023Release notes
Open source →- fix: setLocale does not work when Locale enum is from two packages (by @fzyzcjy)
- fix:
slang outdatedshould skip missing translations instead of throwing an error
-
3.16.013 Apr 2023 -
3.15.029 Mar 2023Release notes
Open source →- feat: add
OUTDATEDmodifier to flag translations as outdated (slang analyzewill treat them as missing) - feat: run
flutter pub run slang outdated my.key.pathto flag translations as outdated - feat:
slang applyprefers modifiers from base locale over secondary locales
- feat: add
-
3.14.014 Mar 2023Release notes
Open source →- feat:
LocaleSettings.useDeviceLocalelistens to device locale changes - feat:
flutter pub run slang applyonly applies changed locales by default - fix: locale selection with script code (e.g.
zh-Hant-TWuseszh-TWinstead ofzh-HK)
- feat:
-
3.13.025 Feb 2023Release notes
Open source →- feat: generated files from
analyzeandapplyhave\nat the end of the file
- feat: generated files from
-
3.12.013 Feb 2023Release notes
Open source →- feat: mixins generated by the interface feature have
==andhashCodeoverrides - feat:
flutter pub run slang applyrespects the order in the base locale instead of simply add the new translations to the end - feat:
flutter pub run slang analyzehave--split-missingand--split-unused(in addition to--split) so only one of both can be a single file
- feat: mixins generated by the interface feature have
-
3.11.002 Feb 2023Release notes
Open source →- feat: add
(ignoreMissing)and(ignoreUnused)modifiers which changes the behaviour offlutter pub run slang analyze
- feat: add
-
3.10.028 Jan 2023Release notes
Open source →- 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_caseshould work with(map)modifier
-
3.9.019 Jan 2023Release notes
Open source →- feat: improve interface attribute inference algorithm
- feat: generate to
lib/gen/<filename>in Flutter environment by default if input is outside oflib/and no output directory is given
-
3.8.017 Jan 2023Release notes
Open source →- feat: add
(interface=<Interface>)and(singleInterface=<Interface>)modifiers, a new approach to configure interfaces without touching the config file - feat: add
AppLocaleUtils.supportedLocalesandAppLocaleUtils.supportedLocalesRaw, this API works inlocale_handling: false - fix: possible class name conflict for objects inside lists
- DEPRECATED:
LocaleSettings.supportedLocalesandLocaleSettings.supportedLocalesRaw
- feat: add
-
3.7.019 Dec 2022 -
3.6.015 Dec 2022Release notes
Open source →- feat: RichText supports links inside default translation
- feat:
flutter pub run slang watchworks recursively and does not crash on error
-
3.5.024 Nov 2022Release notes
Open source →- feat: csv decoding now support both
CRLFandLF,"and' - fix:
LocaleSettings.setPluralResolvershould not throw an assertion error - fix:
flutter pub run slang migrateshould also work without:in command
- feat: csv decoding now support both
-
3.4.012 Nov 2022Release notes
Open source →- feat: add
--locale=<locale>argument toflutter pub run slang applyto only apply a specific locale - BREAKING (TOOL):
--flatargument forflutter pub run slang analyzeandapplyis no longer available
- feat: add
-
3.3.029 Oct 2022Release notes
Open source →- feat:
flutter pub run slang analyzenow also checks unused translations (on top of missing translations) - docs: prefer
slang analyzeoverslang:analyze(and for all other commands); both styles are supported however
- feat:
-
3.2.027 Oct 2022Release notes
Open source →- feat: add command
flutter pub run slang:applyto add translations from theslang:analyzeresult - fix: handle
isFlatMapparameter when overriding translations correctly - fix: update arb migration tool to respect new modifier syntax
- feat: add command
-
3.1.008 Oct 2022Release notes
Open source →- feat: add command
flutter pub run slang:analyzeto report missing translations
- feat: add command
-
3.0.020 Sep 2022Release notes
Open source →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 settingpluralization/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.
Release notes
Open source →New Features:
- null safety support
- add type-safe functions
LocaleSettings.setLocaleTypedandLocaleSettings.currentLocaleTyped
Breaking:
output_translate_varrenamed totranslate_varinbuild.yamlconfig file
- feat: it is now possible to override translations via
-
3.0.0-dev.019 Sep 2022 pre-releaseNothing published for this version
-
2.8.016 Sep 2022Release notes
Open source →- feat: add
AppLocaleUtils.parseLocaleParts - fix:
LocaleSettings.useDeviceLocalenow 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
- feat: add
-
2.7.008 Aug 2022Release notes
Open source →- feat: ignore empty plural / context nodes when
fallback_strategy: base_localeis used - feat: add
coverage:ignore-fileto generated file and ignore every lint
- feat: ignore empty plural / context nodes when