NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #1920 most downloaded on pub.dev
Provides data for world languages in the form of sealed classes.
Last release 18 days ago
20 Sep 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 31 of 32 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
32 releases · first in 2023
One column per quarter.
chore(deps): update l10n_languages to v2.1.0 in sealed_countries
chore(deps): update l10n_languages to v2.1.0 in sealed_countries
IMPROVEMENTS
Inherited from l10n_languages 2.1.0:
availableLocales is now built on first read instead of in the constructor, making a localize() call (mapper construction included) around 25% faster. Mappers are single-use, so every call previously paid for materializing the full 157-locale set even when it was never read.DOCUMENTATION
skills/sealed-languages-core), compliant with the Agent Skills specification, installable via dart run skills@ get.altSymbol: "" skips a redundant lookup per ISO code.chore(deps): update l10n_languages dependency to ^2.0.3
chore(deps): update l10n_languages dependency to ^2.0.3
REFACTOR
LanguageFamily and WritingSystem via @Deprecated.subclass(...) to prepare for making them final in the next major version to support deep immutability.TEST
dartdoc_test validation for code samples in documentation comments.DOCUMENTATION
chore: update flags to v3.2.0 and add changelog for new features
chore: update flags to v3.2.0 and add changelog for new features
- Added new conversion methods for enum-to-object and object-to-enum mappings.
- Added new tests for the enum mapping methods, ensuring correct functionality and coverage.
NEW FEATURES
fromEnums and toEnums extension methods are added to SealedWorldNullableIterableIsoExtension to facilitate mapping between ISO objects and enums.TEST
copyWith methods now support resetting nullable fields to null via domain-invalid sentinel values:
NEW FEATURES
copyWith methods now support resetting nullable fields to null via domain-invalid sentinel values:
String? fields: pass an empty string to reset (e.g. pva: "", bibliographicCode: "", fullName: "", countryCode: "").List?/Set? fields: pass an empty collection to reset.DOCUMENTATION
Nothing published for this version
List get translations was removed (was previously deprecated), refer to .l10n.translatedNames({this}) instead.
🎉 Third anniversary and new major release!
NEW FEATURES
namesCommonNative method on ISO (IsoTranslated) classes, returning the native name for the given locale as a single string.BREAKING CHANGES
namesNative are now provided in sentence case.JsonObjectMap - no longer nullable.List<TranslatedName> get translations was removed (was previously deprecated), refer to .l10n.translatedNames({this}) instead.NaturalLanguage, Script, etc.) instances - sealed classes with private constructors, you can create your own instances via LangCustom and ScriptCustom, for example:const custom = LangCustom(code: "XTL", codeShort: "XT"); // Custom language.
Changes from underlying L10N package:
Previously, localized strings were provided in mixed lowercase (e.g., "inglés", in Spanish for ENG code) and sentence case. They are now unified and provided in sentence case only (e.g., "Inglés", in Spanish for ENG code) to preserve capitalization context for proper nouns and ensure immediate compatibility with independent UI labels.
Justification: Capitalization is context-sensitive and cannot be reliably reconstructed from lowercase source strings. By providing values in sentence case, we ensure high-fidelity data for headers and labels. This was also part of discussion in the past.
Migration:
formatter callback, if not needed).formatter callback to strictly adapt the casing, rather than relying on direct string manipulation.final localized = mapper.localize(
isoCodes,
mainLocale: locale,
formatter: (_, l10n) => l10n.toLowerCase(), // <-- e.g., inline usage
);
CHORE
This version introduces named (Dart 3.10 dot-shorthand compatible) constructors for ISO classes, refactoring the ISO data files to use a factory const
NEW FEATURES
LangEng(), you can now use NaturalLanguage.eng(). This change enhances code readability and aligns with modern Dart practices.const language = LangEng(); // Old way (still supported).
const language = NaturalLanguage.eng(); // New way, or just .eng() in Dart 3.10.
print([NaturalLanguage.eng(), NaturalLanguage.fra()]); // Collections, 3.9 way.
// You can also use the new dot-shorthand syntax introduced in Dart 3.10:
print(<NaturalLanguage>[.eng(), .fra()]); // Collections, 3.10 way.
Marked permissive constructors and translation-related parameters as deprecated; deprecated a translation interface and related extension methods.
REFACTOR
permissive constructors and translation-related parameters as deprecated; deprecated a translation interface and related extension methods.CHORE
Improved documentation in README.
DOCUMENTATION
CHORE
Deprecated legacy constant lists in favor of centralized static lists for ISO classes.
NEW FEATURES
REFACTOR
is* getters in favor of direct type checks.CHORE
DOCUMENTATION
TEST
Enhance ISO standardized classes with Comparable interface and update bool getters.
NEW FEATURES
Comparable interface and update bool getters.CHORE
REFACTOR
DOCUMENTATION
TEST
Nullable maybeCommonNameFor method now accepts nullable mainLocale parameter - if null is provided, null will be returned.
REFACTOR
maybeCommonNameFor method now accepts nullable mainLocale parameter - if null is provided, null will be returned.Improved generics handling in localization methods.
REFACTOR
DOCUMENTATION
The commonNamesCacheMap is deprecated because it relies on the memory-intensive translations getter.
🎉 Second anniversary and new major release!
NEW FEATURES
commonNamesMap on ISO collections and commonNameFor/maybeCommonNameFor on ISO objects. These methods are significantly faster than the old translations - related methods because they work directly with locale-specific maps instead of iterating through all translations of each ISO object.translations getter is now a real computed field. This means it will only generate the translations when they are requested, rather than storing them all in memory. It's recommended to cache the results of the getter to avoid redundant calculations. Because of that - translation and maybeTranslation methods are no longer recommended for retrieving localization data.commonNamesCacheMap is deprecated because it relies on the memory-intensive translations getter.IsoTranslated objects simplify complex queries for object localizations.IsoStandardized objects can now be applied to null values. For example, maybeIso.isRus will return false if maybeIso is null, without the need for additional null-checks.BREAKING CHANGES
IsoTranslated<T, N, L> class now uses three generic types instead of two. If you used this class directly in your code, simply add the additional generic <L extends BasicLocale> to your reference.toString() implementation of BasicLocale now uses Flutter's Locale-like output format. You can still access the old output by setting the short flag to false.sealed_language_translations library is deprecated. Migrate to the l10n_languages package or use l10n getter in ISO objects that provides the same data without holding all translations in memory. This sub-library and its content (except for supported languages lists - they will be moved to the main library) will be removed in the next major package version.Added "polski" to the Polish language's namesNative array.
NEW FEATURES
namesNative array.toString() method implementations in models and addressing new lints + DCM reports.> This is the last minor version update with significant changes for some time. The next steps will be patches at most. Currently working on sealed_co
This is the last minor version update with significant changes for some time. The next steps will be patches at most. Currently working on
sealed_countries(andworld_countries) v2.0.0 which will bring new data and a big feature there, very likely without breaking the existing API.
NEW FEATURES
locale parameter in the maybeTranslation method is now nullable.permissive constructors are now even more permissive, only name and code parameters remain required.🦾 Language translations now support all GlobalMaterialLocalization + GlobalCupertinoLocalizations locales.
NEW FEATURES
GlobalMaterialLocalization + GlobalCupertinoLocalizations locales.internationalName getter in IsoStandardized interface, representing the international name of the ISO object.UpperCaseMap class, that UpperCaseIsoMap extends, a simple version of UpperCaseIsoMap without key length checks and IsoStandardized values requirement.BasicLocale class, that TranslatedName extends. Representing a type-safe world locale (language, country/region code and script).commonNamesCacheMap method for all ISO based sealed classes collections, which allows to create a cache map of common names translations for the given BasicLocale.BREAKING CHANGES
Because of the BasicLocale changes (described above), translation() and maybeTranslation() methods on the Translated classes now require BasicLocale input. If you are not using those methods directly, then you don't need to change anything, otherwise you will need to do small adjustment - wrap the content of those methods with a BasicLocale.
Before:
print(iso?.maybeTranslation(LangPor()));
After:
print(iso?.maybeTranslation(BasicLocale(LangPor())));
Or just:
(translation\()(.*)(\))$1BasicLocale($2)$3Refactored asserts in maybeMapIsoCode method.
REFACTOR
maybeMapIsoCode method.codeOther is no longer nullable (in all IsoStandardized classes).
NEW FEATURES
codeOther is no longer nullable (in all IsoStandardized classes).UpperCaseIsoMaps) in every ISO class (accessible as static constants via .map, .codeMap, .codeShort etc.).IsoStandardized classes now allow non-String inputs - any Object, for example you can now use StringBuffer or Enum instances directly: enum IsoEnum {de, fr, ar} // On .fromCode(IsoEnum.de) call it will use "DE" input.
or you can basically use any custom class with toString() override:
class CustomIsoCodeClass {
const CustomIsoCodeClass({String code = '123', this.foo}) : _code = code;
final String _code;
final Foo? foo;
@override
String toString() => _code; // Has to override toString() with ISO value.
}
// On .fromAnyCode(CustomIsoCodeClass(code: ' 321 ')) call it will use "321" input.
Added new static maybeFrom* methods and refactored old ones. They are also now accept any Object? input instead of just String?.
NEW FEATURES
maybeFrom* methods and refactored old ones. They are also now accept any Object? input instead of just String?.firstIsoWhere* extensions on ISO iterables.is* boolean getters for example:if (isoObject.isFra) return _onFrench();
is more readable and shorter equivalent of this check:
if (isoObject == const LangFra()) return _onFrench();
Added new constructor called permissive - which allow the creation of custom class instances that are not fully compatible with the ISO standard.
NEW FEATURES
permissive - which allow the creation of custom class instances that are not fully compatible with the ISO standard.Translated class is now sealed - which means you can now directly compare instances of different ISO classes directly (for example in switch statements).🎉 First anniversary and first stable release!
🎉 First anniversary and first stable release!
NEW FEATURES
TranslatedName name called common, which might be useful in some cases when name is being used by a parent class.> Note: Please make sure to replace deprecated methods with suggested replacements, because all of them will be removed in version 1.0.0.
NEW FEATURES
IsoTranslated which combines Translated and IsoStandardized interfaces.standard* static constants in ISO classes referencing different names of specific standards.Note: Please make sure to replace deprecated methods with suggested replacements, because all of them will be removed in version 1.0.0.
Added new factories to Script and NaturalLanguage - fromAnyCode, which do the length and type checks and redirects to other fromCode\* constructors
NEW FEATURES
Script and NaturalLanguage - fromAnyCode, which do the length and type checks and redirects to other fromCode\* constructorsScript and NaturalLanguage - maybeFromAnyCode, which works same way as fromAnyCode, but doesn't throws StateErrors if no ISO object is found.maybeMapIsoCode method to String extensions, which is used under the hood of (maybe)fromAnyCode.REFACTOR
Renamed isIsoCode to isIsoAlphaRegularCode.
Named classes now has boolean flag (short, defaults to true).
TranslatedName class by default returns .name value on toString().
Refactored dollar symbols in toString() methods.
Added new sealed class - Scripts, comes from ISO 15924 standard.
NEW FEATURES
Scripts, comes from ISO 15924 standard.NaturalLanguage class now contains info about scripts (writing systems) and translations of language name to other languages.translation and maybeTranslation methods for Translated classes (i.e. NaturalLanguage).IsoStandardized classes - there is an optional parameter to provide custom listTranslatedName class for translations.Named and Translated.Added new interfaces (IsoStandardized, JsonEncodable) and typedef (JsonMap) to the model.
NEW FEATURES
IsoStandardized, JsonEncodable) and typedef (JsonMap) to the model.copyWith, toJson, etc. to the NaturalLanguage class.NaturalLanguage.list is now sorted alphabetically by the (3 letter) code.
BREAKING CHANGES
NaturalLanguage.list is now sorted alphabetically by the (3 letter) code.REFACTOR
dev_dependencies.REFACTOR - Updates in dev_dependencies.
REFACTOR
dev_dependencies.DOCUMENTATION - Provided structure screenshot.
DOCUMENTATION
Increase code coverage to 100%.
TEST
Provided code coverage links and badge.
DOCUMENTATION
- Initial release.
Your coding agent can read these notes before it upgrades. Set up the MCP server →