locale_manager 0.1.0
locale_manager: ^0.1.0 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 #
Android video demo #
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.