i18n_loader library

Classes

I18nJsonLoader
Runtime JSON-backed translation lookup.

Enums

FlattenKeyStyle
How nested JSON paths are turned into a single lookup key at codegen time.

Extensions

FlattenKeyStyleParsing on FlattenKeyStyle
I18nJsonLoaderStringExtension on String
Shorthand for I18nJsonLoader.tr when you already hold a loader instance.

Functions

buildDartStringMapLiteral(Map<String, String> strings) String
Builds a Dart map literal from a flattened string map.
buildFlattenKey(List<String> pathSegments, FlattenKeyStyle style) String
Builds the canonical lookup key for a JSON path using style.
escapeDartString(String value) String
Escapes value for use inside a Dart double-quoted string literal.
flattenJsonToStrings(Map<String, dynamic> json, {FlattenKeyStyle style = FlattenKeyStyle.dot}) Map<String, String>
Flattens nested JSON into one lookup key per string value.
normalizeTrKey(String key, FlattenKeyStyle style) String
Normalizes a lookup key to the canonical format used at codegen.
resolveFlattenKeyStyle({FlattenKeyStyle? explicit, String? configValue, String? keyCaseName}) FlattenKeyStyle
Resolves the flatten style from config/CLI values.