@preferInline Locale localeFromString(String value) { final tags = value.split("-"); if (tags.length == 1) { return Locale(tags[0]); } else { return Locale(tags[0], tags[1]); } }