app_name_localizer 1.2.0
app_name_localizer: ^1.2.0 copied to clipboard
A powerful CLI tool to easily and automatically localize your Flutter app name across all Flutter platforms without manual configuration.
๐ App Name Localizer Pro #
A powerful, interactive, and easy-to-use Command Line Interface (CLI) tool for Flutter developers to seamlessly localize their app's display name for multiple platforms.
No more manual editing of AndroidManifest.xml, strings.xml, Info.plist, or project.pbxproj! Just define your app names in your pubspec.yaml and let the magic happen.
โจ Features #
- ๐ค Smart Android Automation: Automatically updates
AndroidManifest.xml(safely targets only the<application>tag) and generatesstrings.xmlfor all defined languages. - ๐ Smart iOS & macOS Automation: Intelligently configures
Info.plist(enablesLSHasLocalizedDisplayName), registers language variants, and seamlessly injectsInfoPlist.stringsinto your Xcodeproject.pbxproj. - ๐ง Linux Automation: Generates/updates a localized
.desktopfile with aName[lang]entry per language. - ๐ Dry Run: Preview exactly what would change โ a per-file diff โ without writing anything, using
-n/--dry-run. - ๐ก๏ธ Built-in Safety (Auto-Backups): Before touching critical files, the tool automatically creates a backup (
.bak) so you never lose your data. - โช Safe Revert System: Made a mistake? Easily restore all original files from backups with a single command (
-r). - ๐งน Workspace Cleanup: Keep your repository clean! Safely delete all generated
.bakfiles once you are satisfied (-c). - ๐ป Interactive CLI: Choose to update, revert, or clean specific platforms using a beautiful terminal menu with safety confirmations.
- โก CI/CD Ready: Use terminal flags (
-a,-i,-m,-l,-w,--web) to bypass the interactive menu for automated pipelines.
โ ๏ธ Web & Windows: single-name limitation #
Android, iOS, macOS, and Linux all have a native, per-locale app-name mechanism, so every language in your config gets its own localized name. Web and Windows do not โ a Web App Manifest only has one name, and a Windows executable's taskbar title / resource strings only support one value by default. For these two platforms, the tool picks a single primary name (your en entry if present, otherwise the first language in your config) and applies it everywhere. It won't switch per the end user's browser or OS language.
๐ Getting Started #
1. Installation #
Add the package to your dev_dependencies in your pubspec.yaml file:
dev_dependencies:
app_name_localizer: ^1.2.0
(Substitute the version above with whatever is currently published on pub.dev.)
Or simply run:
dart pub add dev:app_name_localizer
2. Configuration #
Add a new section at the root level of your pubspec.yaml file named app_name_localizer. Define your language codes and the corresponding app names:
app_name_localizer:
en: "My Super App"
ar: "ุชุทุจููู ุงูุฎุงุฑู"
es: "Mi Sรบper Aplicaciรณn"
fr: "Mon Super App"
๐ ๏ธ Usage #
Open your terminal and run the following command from the root of your Flutter project to launch the interactive menu:
dart run app_name_localizer
Fast CLI Flags #
If you want to execute operations directly:
- Target Android:
dart run app_name_localizer -a - Target iOS:
dart run app_name_localizer -i - Target macOS:
dart run app_name_localizer -m - Target Linux:
dart run app_name_localizer -l - Target Windows:
dart run app_name_localizer -w - Target Web:
dart run app_name_localizer --web - Preview Changes (no writes):
dart run app_name_localizer -n(combine with platform flags, e.g.-n -a -i) - Revert Changes:
dart run app_name_localizer -r - Clean Backups:
dart run app_name_localizer -c - Help:
dart run app_name_localizer -h
๐ก Pro Tip (Combining Flags): You can combine flags to perform highly specific operations!
- Update iOS and macOS only:
dart run app_name_localizer -i -m - Clean Android backups only:
dart run app_name_localizer -c -a - Preview an Android-only run before committing to it:
dart run app_name_localizer -n -a
โ ๏ธ Important Next Steps #
After running the tool successfully, it is highly recommended to clean and rebuild your project to ensure the OS picks up the new native files:
flutter clean
flutter pub get
flutter run
๐จโ๐ป Developer & Credits #
Developed with โค๏ธ by Emad Younis (EA).
- ๐ง Email: emadeadev@gmail.com
- ๐ Found a bug or have a feature request? Please open an issue on the GitHub repository!