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

Flutter plugin to manage the locale of the native layer.

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: ^0.0.1

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.

2
likes
0
points
16
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter plugin to manage the locale of the native layer.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on locale_manager

Packages that implement locale_manager