slang 2.8.0 slang: ^2.8.0 copied to clipboard
Localization / Internationalization (i18n) solution. Use JSON, YAML or CSV files to create typesafe translations via source generation.
2.8.0 #
- 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
2.7.0 #
- 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
2.6.2 #
- feat: add Russian plural resolver (thanks to @LuckyWins)
- fix: parse rich text with interpolation
braces
anddouble_braces
correctly
2.6.1 #
- fix: remove
const
if rich text has links
2.6.0 #
- feat: render context enum values as is, instead of forcing to camel case
- feat: add additional lint ignores to generated file
- fix: generate correct ordinal (plural) call
- fix: handle rich texts containing linked translations
2.5.0 #
- feat: add extension method shorthand (e.g.
context.tr.someKey.anotherKey
) - feat: add
LocaleSettings.getLocaleStream
to keep track of every locale change - feat: return more specific
TextSpan
instead ofInlineSpan
for rich texts
2.4.1 #
- fix: do not export
package:flutter/widgets.dart
2.4.0 #
- feat: allow external enums for context feature (add
generate_enum
andimports
config) - feat: add default context parameter name (
default_parameter
) - feat: add export statement in generated file to avoid imports of extension methods
2.3.1 #
- fix: add missing fallback for flat map if configured
2.3.0 #
- feat: use tight version for
slang_flutter
andslang_build_runner
- fix: throw error if base locale not found
- fix:
TranslationProvider
should use current locale - fix: use more strict locale regex to avoid false-positives when detecting locale of directory name
2.2.0 #
- feat: locale can be moved from file name to directory name (e.g.
i18n/fr/page1_fr.i18n.json
toi18n/fr/page1.i18n.json
)
2.1.0 #
- feat: add
slang.yaml
support which has less boilerplate thanbuild.yaml
- fix: move internal
build.yaml
to correct package
2.0.0 #
Transition to a federated package structure
- Breaking: rebranding to
slang
- Breaking: add
slang_build_runner
,slang_flutter
depending on your use case - Breaking: remove
output_file_pattern
(was deprecated) - feat: dart-only support (
flutter_integration: false
) - feat: multiple package support
- feat: RichText support
Thanks to @fzyzcjy.
You can read the detailed migration guide here.