registerLocalizedUnitNames function

void registerLocalizedUnitNames(
  1. String locale,
  2. Map<String, String> names
)

Registers custom localized full names for a locale. Keys must be canonical symbols (e.g., KB, MiB, kb).

Implementation

void registerLocalizedUnitNames(String locale, Map<String, String> names) {
  final key = locale.toLowerCase();
  final existing = _customLocalizedUnits.putIfAbsent(key, HashMap.new);
  existing.addAll(names);
}