locale_manager 0.0.2+4 copy "locale_manager: ^0.0.2+4" to clipboard
locale_manager: ^0.0.2+4 copied to clipboard

Flutter plugin to manage the locale of the native layer. This plugin provides a convenient way to handle localization in your Flutter app.

locale_manager #

The LocaleManagerPlugin is a Flutter plugin that allows you to update the native language setting of the app for both iOS and Android. This can be useful when you want to dynamically change the app’s language.

Usage #

To use this plugin, add locale_manager as a dependency in your pubspec.yaml file.


dependencies:
	locale_manager: any

Available Methods #

  • setLocale: Sets the native language of the app. Parameter: locale (String) - the language code to set (e.g., en-US, pt-BR).
  • getLocale: Returns the current language of the app.
  • getLocalized: Returns the localized string for a specific key.

Example #

Follow the demo app in example project.

iOS video demo #

iOS video

Android video demo #

Android video

Limitations #

The iOS plugin updates the View only if the specified language is supported by the app. If the language is not supported, the app will continue to use the previous language until restart.

Contributions #

Contributions are welcome. Please open a PR. Note that this project is still in its early stages and may have some bugs. If you find any, please open an issue.

We need help with the following:

  • ❌ Adding tests
  • ❌ Web support
  • ❌ MacOS support
  • ❌ Windows support
  • ❌ Linux support

License #

This project is licensed under the MIT License - see the LICENSE file for details.

1
likes
160
pub points
54%
popularity

Publisher

unverified uploader

Flutter plugin to manage the locale of the native layer. This plugin provides a convenient way to handle localization in your Flutter app.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on locale_manager