Discover and explore top open-source AI tools and projects—updated daily.
Type-safe i18n solution for Dart and Flutter apps
Top 57.4% on SourcePulse
slang
is a Dart and Flutter library for type-safe internationalization (i18n). It simplifies the process of managing translations, ensuring type safety and compile-time checks for your localized strings, benefiting developers building multi-language applications.
How It Works
slang
leverages Dart's static typing and code generation to create type-safe accessors for your translation keys. It parses translation files (e.g., .arb
or .json
) and generates Dart code that maps directly to your localized strings, including support for pluralization and parameters. This approach eliminates runtime errors associated with missing keys or incorrect parameter types.
Quick Start & Requirements
dart pub add slang
or flutter pub add slang
.dart run slang
or flutter pub run slang
to generate code.Highlighted Details
.arb
, .json
, .yaml
).Localizations
system.Maintenance & Community
slang-i18n
team.Licensing & Compatibility
Limitations & Caveats
The library is primarily focused on Dart and Flutter projects; cross-platform support outside this ecosystem is not a stated goal. While robust, complex translation structures might require careful organization to maintain optimal generated code readability.
1 week ago
1 day