Skip to content
pubscout

sealed_languages

3.4.1, released 5 weeks ago by tsin.is

Provides compile-time constant data for world languages and scripts with ISO codes.

WASM-ready
$ flutter pub add sealed_languages
Source repository

What it does

Provides information about world languages via compile-time, tree-shakable constant sealed classes. Includes ISO 639-1 and ISO 639-2 codes, native names, language families, right-to-left flags, and 140+ translations.

AI-written summary of version 3.4.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need detailed metadata about world languages in your Dart or Flutter application.
  • You want compile-time constant, tree-shakable language objects with full type safety.
  • You need language name translations or language family lookups.

Skip it when

  • You need a UI language picker widget (use world_countries instead for Flutter widgets).

Strengths

  • Zero third-party dependencies.
  • Compile-time constants with sealed class exhaustiveness.
  • Comprehensive coverage of 184 languages with ISO codes and translations.

Weaknesses

  • Does not include Flutter UI widgets out of the box (delegated to world_countries).

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1

not documented

import 'package:sealed_languages/sealed_languages.dart';

final fromCode = NaturalLanguage.fromCode("Eng");
print("${fromCode.name}: ${fromCode.codeShort}");

Alternatives

Packages that do the same job and could replace sealed_languages.

  • language_info_plus

    Provides a static list of world languages with ISO‑639‑1 codes and optional localized names.

  • locale_plus

    Access native device locale data like language, country code, time zone, and number formats.

  • flutter_locales

    Easily localize Flutter apps using JSON files with dynamic locale switching and persistent storage.

  • locale_names

    Provide locale display names in various locales via extensions on Locale from dart:ui.

Works with

Packages commonly used together with sealed_languages: ones it builds on, ones built on it, and its own family.