Skip to content
pubscout

l10n_languages

2.2.0, released 5 weeks ago by tsin.is

Provides CLDR-like translations for language names across 157 locales.

WASM-ready
$ flutter pub add l10n_languages
Source repository

What it does

Provides localized names for languages using ISO codes across 157 different locales. It uses a single-use mapper design for memory efficiency and supports tree-shakability via dart define flags.

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

Use it when

  • You need to display localized language names in your UI.
  • You want dependency-free language translations with support for multiple locales and fallbacks.

Skip it when

  • You need general app localization or asset string translation (use intl or easy_localization instead).
  • You need to reuse the same mapper instance across multiple calls.

Strengths

  • Dependency-free and lightweight.
  • Supports 157 locales out of the box.
  • Lazy initialization and single-use design reduce memory footprint.

Weaknesses

  • Mapper instances are single-use only and cannot be reused after calling localize().

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0

not documented

void main() {
  final mapper = LanguagesLocaleMapper();
  final isoCodes = {"ENG", "RUS", "POL"};
  final localized = mapper.localize(isoCodes, mainLocale: "sk", fallbackLocale: "cs");
  print("Names count: ${localized.length}");
}

Alternatives

Packages that do the same job and could replace l10n_languages.

  • intl

    Standard internationalization and localization support for Flutter and Dart.

  • easy_localization

    Easy localization handling with JSON, CSV, and translation files.

  • slang

    Type-safe internationalization through code generation.

Works with

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