NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #726 most downloaded on pub.dev
Localization / Internationalization (i18n) solution. Use JSON, YAML, CSV, or ARB files to create typesafe translations via source generation.
Last release 26 days ago
12 Sep 2026
Ships fairly regularly
a new release about every 3 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
102 releases · first in 2022
One column per quarter.
fix: prefer script match when resolving locales (e.g. zh-Hant-TW resolved to zh-Hans instead of zh-Hant)
zh-Hant-TW resolved to zh-Hans instead of zh-Hant)fix: flat map (t['key']) of region locales did not fall back to the base locale
t['key']) of region locales did not fall back to the base localefeat: add relative linked translations (@:.sibling resolves against the siblings of the current translation)
@:.sibling resolves against the siblings of the current translation)feat: add slang_build_runner:legacy to restore old build_runner behaviour avoiding Asset already exists errors
slang_build_runner:legacy to restore old build_runner behaviour avoiding Asset already exists errorsAppLocaleUtils.parse (and LocaleSettings.setLocaleRaw) ignored the country code of plain language-COUNTRY tags (e.g. en-US, en-GB)feat: replaced internal basicLocaleListResolution with custom (simpler) implementation
slang_build_runner only applies to direct dependentslang configurefeat: respect all locale preferences of the device instead of only the first locale
--preserve-order flag to slang applyfeat: Region Extensions, de-CH will fall back to de before falling back to the base locale
de-CH will fall back to de before falling back to the base locale[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: automatically fix common casing typos during slang wip apply based on existing translations and majority vote
slang wip apply based on existing translations and majority vote@@notes in translation files to give LLMs more contextDEPRECATED: Do not specify paths for interfaces in config, use interface modifier in the translation keys instead (e.g. myKey(interface=MyInterface) )
generate_mixin to interfaces config to allow predefined mixins instead of generating new ones (#347)build_runner build --workspace, requires build_runner: ^2.12.1 (#348)myKey(interface=MyInterface))feat: also format base locale when running slang normalize ( #344 ) @adil192
slang normalize (#344) @adil192feat: announcing slang_mcp , a new package to work with LLMs more efficiently
fix: do not throw an error on empty translation files
slang analyze should handle maps with numbers or dots as keys (#339, #340)t.$wip(x) where x is a variable or a function callfix: handle edge cases in t.$wip detection
t.$wip detection (#330) (#331)feat: simplify ${arg} to $arg if possible
${arg} to $arg if possiblet.$wip('Welcome $name') or t.$wip.welcome.title('Welcome $name') for key-less prototyping without code generationdart run slang wip apply to add the translations to resources and update the Dart code accordinglyt.$wip('Welcome $name') or t.$wip.welcome.title('Welcome $name') for key-less prototyping without code generationdart run slang wip apply to add the translations to resources and update the Dart code accordinglyfix: when L10n and linked translations are used together, the L10n parameter type got lost
Added support for custom contexts. Example:
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.
fix: call setLocale without WidgetsBinding
Fix: generate default plural resolvers when auto pluralization is used
Fix: generate default plural resolvers when auto pluralization is used
Detect pluralization automatically, configure it via pluralization->auto: cardinal / ordinal
Detect pluralization automatically, configure it via pluralization->auto: cardinal / ordinal
fix: remove new line in autodoc output
feat: add option to turn off flat map generation via flat_map: false
flat_map: falsefallback_strategy configuration, possible values strict (default), base_localeflutter pub run fast_i18n watch (experimental)autodoc feature enabled by default that generates the base translation as documentation for the translation keys (#218)slang analyze supports --source-dirs (#309) @khoadngslang configure supports --source-dirs (#308) @khoadngbuild constraint in slang_build_runnerfix: add override to reserved keywords so it will be sanitized as well
override to reserved keywords so it will be sanitized as well (#303)Handle string interpolation at the beginning (for braces and double_braces )
Handle string interpolation at the beginning (for braces and double_braces)
New string_interpolation configuration. Possible values: dart (default) , braces and double_braces .
New string_interpolation configuration. Possible values: dart (default), braces and double_braces.
dart: Hello $name or ${name2}
braces: Hello {name}
double_braces: Hello {{name}}
Fixes in build_runner.
The legacy version of 4.7.1.
Built on build 1.3.0, glob 1.2.0, yaml 2.2.1 and build_runner 1.10.2.
feat: remove json2yaml dependency, reimplement a simple opinionated YAML writer
json2yaml dependency, reimplement a simple opinionated YAML writerfix: automatically initialize the locale when overriding an uninitialized locale
feat: add Translations.$copyWith() and TranslationMetadata.getOverride to allow adding custom behavior
feat: remove hint when overriding plural resolvers (were too verbose)
zero quantity to cs, de, en and vi (not breaking)dev_dependenciesfix: @ for required missing (Flutter 1.x.x)
@ for required missing (Flutter 1.x.x)null_safety is true by default (as intended in 4.4.0)feat: add Flutter 1.x.x support, build_runner detects this automatically, otherwise set null_safety: false in build.yaml
null_safety: false in build.yamlflutter pub run fast_i18n ignores build.yaml files without fast_i18n entry_renderedResolvers(fallback) modifier to fallback entries within a map (#268)fallback_strategy: base_locale_empty_stringfeat: plural resolvers can now be overwritten
strings_de.json -> de.jsonstrings.json -> strings_en.json, except the locale is specified in the directory nameNote: 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
fix: do not sanitize keys in maps
feat: add pluralization support
AppLocale has a new property called flutterLocaleflutter pub run fast_i18n which is much faster than flutter pub run build_runner build --delete-conflicting-outputscontinue, 123) (#257)locale in L10n format definitionA rebuild is needed: flutter pub run build_runner build .
A rebuild is needed: flutter pub run build_runner build.
strings_en_US)strings_zh-Hant-TW)LocaleSettings.supportedLocales statically without library callTranslations.of(context).The typed version is now first class.
The typed version is now first class.
setLocale -> setLocaleRaw, setLocaleTyped -> setLocalelocales -> supportedLocalesRawAppLocale.toLanguageTag -> AppLocale.languageTagtranslation_class_visibility in build.yaml (in most cases just keep it private!)edit -> rebuild i18n -> hot reload works now for faster developmentDateFormat, 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.
DateFormat and NumberFormat support (#112)lazy: true config which is enabled by default (#135)slang analyze should not treat translations as unused if they are used in linked translations (#231)slang analyze should detect missing enums (#234)"male, female": "..." to "male,female": "...") (#247)key_case is set (#253)setLocale, setLocaleRaw, and useDeviceLocale returns a Future, use -Sync suffix for synchronous callsoutput_format removed, always generates multiple files nowLocaleSettings (supportedLocales, supportedLocalesRaw) removedbuild.yaml or slang.yaml (deprecated in v3.19.0)context are no longer transformed into pascal case keeping the original caseYou can read the detailed migration guide here.
Nothing published for this version
Nothing published for this version
feat: add syntax to escape linked translations (#248) @Fasust
fix: should match first language code if there are no matches by country code and at least one match by language code (#241) @Tienisto
fix: "translation overrides" do not work with parameterized linked translations (#226) @Tienisto
dart run slang analyze (#222) @Tienistofeat: add dart run slang normalize to normalize translations based on base locale @Tienisto
dart run slang normalize to normalize translations based on base locale @Tienistofix: commented out translations should be declared as unused during slang analyze (#200) @nikaera
slang analyze (#200) @nikaerafix: when applying translations with dart run slang apply, only modifiers from the base locale should be used
dart run slang apply, only modifiers from the base locale should be used (#192)feat: add parameter types (e.g. Hello {name: String}, you are {age: int} years old ); is Object by default @Tienisto
feat: dart run slang analyze supports csv files ( #185 ) @nikaera
dart run slang analyze supports csv files (#185) @nikaerapart of directive when using a custom dart file extension (#187) @cmenkemellerfeat: add fallback_strategy: base_locale_empty_string to also treat empty strings as missing translations
feat: add support for ARB files
fix: should not escape special characters when parsed via the "Translation Overrides" feature
fix: generate correct compatibility typedef for Translations class
Translations class (#176)feat: base translation class is named Translations so that Translations.of(context) returns the same type
feat: add dart run slang clean to remove unused translations after running slang analyze
dart run slang clean to remove unused translations after running slang analyze (#141)--exit-if-changed to slang analyze to fail CI if there are missing / unused translations (#141)contextBuilder and nBuilder parameter in rich text if not needed (#168)feat: slang edit add respects order in base locale ( @adil192 )
slang edit add respects order in base locale (@adil192)slang edit add works without a specified locale, it will add the string to all localesWidgetsBinding.instance.platformDispatcher instead of PlatformDispatcher.instance in findDeviceLocale implementationfeat: support multiple TranslationProvider at the same time when using multiple packages
TranslationProvider at the same time when using multiple packagesbuild_runnerfeat: announcing slang_gpt , a new package to generate translations with GPT
fix: migrate away from deprecated WidgetsBinding.instance.window in findDeviceLocale implementation
feat: add slang edit add (short: slang add ) to add new translations ( #150 ) (by @adil192 )
DEPRECATED: Use explicit context modifier instead of relying on the config file (see migration guide )
enum in the config anymore)slang edit copy to copy translationscontext modifier instead of relying on the config file (see migration guide)- chore: add logo
feat: add slang edit to move or delete translations over all locales
slang edit to move or delete translations over all localesfix: setLocale does not work when Locale enum is from two packages (by @fzyzcjy )
slang outdated should skip missing translations instead of throwing an errorYour coding agent can read these notes before it upgrades. Set up the MCP server →