localizes static method
Implementation
static List<String> localizes(
String key, {
String? name,
List<String>? defaultValue,
bool applyNumber = false,
bool applyRtl = false,
bool applyTranslator = true,
String Function(String)? replace,
Map<String, Object?>? args,
}) {
Iterable<String>? value = i
._lts(
key,
name: name,
defaultValue: defaultValue,
applyTranslator: applyTranslator,
)
?.whereType<String>();
if (value == null || value.isEmpty) value = defaultValue ?? [];
if (args != null) value = value.map((e) => e.replace(args));
if (replace != null) value = value.map(replace);
if (applyNumber) value = value.map((e) => i._ln(e, applyRtl: applyRtl));
return value.toList();
}