FLUTTER ECOSYSTEM

devicelocale

A Flutter package that can be used to extract the locales that are currently defined on a device with the current locale set as the first in the list.

Latest version
0.8.2
30-day downloads
97.7K
Likes
150
Pub points
150

Package Overview

Selection guidance generated from public package information. For reference only.

Overview

The devicelocale package is a Flutter utility that retrieves the list of locales configured on the user's device, with the current system locale appearing first. It supports multiple platforms including Android, iOS, Web, macOS, and Linux, making it ideal for applications requiring localization-aware behavior. By accessing native device settings, it enables apps to dynamically adapt to user preferences without manual configuration. The package is lightweight and integrates seamlessly into internationalization workflows.

Use cases
  • Dynamic language detection in multilingual apps
  • Auto-selecting user’s preferred language at launch
  • Supporting app localization based on device settings
  • Building region-aware features
  • Synchronizing UI language with system preferences
Key features
  • Returns device-defined locales with current locale first
  • Cross-platform support across major OSes
  • Simple API for retrieving locale lists
  • Integrates with Flutter's localization framework
  • Lightweight and dependency-free
Suitable for
  • Apps targeting global audiences
  • Localization-heavy applications
  • Developers using Flutter's intl package
  • Projects needing automatic locale fallback
  • Teams implementing responsive internationalization
Considerations
  • Relies on native device settings
  • Does not handle custom locale overrides
  • May return empty list if no locales are set
  • Requires platform-specific permissions on some systems
  • Limited to reading, not modifying device locale settings
Supported platformsAndroidiOSWebmacOSLinux

Install package

flutter pub add devicelocale

Categories

Source repository

Related projects