Skip to content
pubscout

multiple_localization

0.6.0, released a year ago by innim.ru

Support for multiple ARB and messages localization files for the intl package.

WASM-ready
$ flutter pub add multiple_localization
Source repository

What it does

Allows using multiple ARB localization files and registering separate delegates for each. It solves the intl package limitation where only the first initializeMessages call is processed.

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

Use it when

  • You need to add intl localization with ARB files to a separate package and use it in a main project with its own localization files.
  • You want to specify a fallback locale for your intl translations.

Skip it when

  • You only have a single localization file for your application.

Strengths

  • Enables modular localization across different packages and the main app.
  • Supports fallback locale configuration.
  • Supports overriding package localization strings inside the main project.

Weaknesses

  • Providing a fallback locale loads all messages into memory at application start.
  • Requires manual setup in localization delegates instead of built-in generator support.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

Replace initializeMessages with MultipleLocalizations.load inside your LocalizationsDelegate load method.

@override
Future<AppLocalizations> load(Locale locale) {
  return MultipleLocalizations.load(
      initializeMessages, locale, (l) => AppLocalizations(l),
      setDefaultLocale: true);
}

Alternatives

Packages that do the same job and could replace multiple_localization.

  • easy_localization

    Provides a comprehensive localization solution with JSON/YAML/CSV/TXT support without relying on the standard intl generator flow.

  • slang

    Offers strongly typed localizations with code generation and multi-file support out of the box.

Works with

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