flutter_app_name_localization 0.0.6 copy "flutter_app_name_localization: ^0.0.6" to clipboard
flutter_app_name_localization: ^0.0.6 copied to clipboard

PlatformAndroid

A plugin to localize the Android app name.

flutter_app_name_localization #

flutter_app_name_localization is a Flutter plugin that simplifies the process of localizing your Android app's name. This plugin reads the app name configuration from your pubspec.yaml file and updates the Android manifest accordingly.

Features #

  • Localize the app name for different languages
  • Automatically update the Android manifest
  • Easy configuration via pubspec.yaml

Getting Started #

Installation #

Add flutter_app_name_localization to your pubspec.yaml file under dev_dependencies:

dev_dependencies:
  flutter_app_name_localization: ^0.0.6

Configuration #

Configure your localized app names in the pubspec.yaml file under the flutter_app_name_localization section:

flutter_app_name_localization:
  default: "MyApp"
  locales:
    - locale: "de"
      name: "MeineApp"
    - locale: "fr"
      name: "MonApp"
  • default: The default app name.
  • locales: A list of locales and their corresponding app names.

Usage #

1- After configuring your app names, run the following command to update the Android manifest:

dart run flutter_app_name_localization

This command will create values-de and values-fr directories in the android/app/src/main/res directory.

2- Update your App name in the AndroidManifest.xml file:

 android:label="@string/app_name"

Example #

Given the following configuration in pubspec.yaml:

flutter_app_name_localization:
  default: "MyApp"
  locales:
    - locale: "de"
      name: "MeineApp"
    - locale: "fr"
      name: "MonApp"

Running dart run flutter_app_name_localization will create the following directories:

android/app/src/main/res/values-de
android/app/src/main/res/values-fr

The strings.xml file in the values-de directory will contain:

<resources>
    <string name="app_name">MeineApp</string>
</resources>

The strings.xml file in the values-fr directory will contain:

<resources>
    <string name="app_name">MonApp</string>
</resources>

!! Warning !!: You still need to update the AndroidManifest.xml file manually. Go to "Usage" section Step2 for more information.

License #

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

Contributing #

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

Support #

If you encounter any issues or have questions, feel free to open an issue on the GitHub repository.

Contributors #

  • [Mahir Taha Ozdin](https://github.com/mahirozdin)
  • [Mauro Vanetti](https://github.com/maurovanetti)
4
likes
130
points
226
downloads

Publisher

verified publisherbubiapps.com

Weekly Downloads

A plugin to localize the Android app name.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

args, flutter, path, plugin_platform_interface, xml, yaml

More

Packages that depend on flutter_app_name_localization