Skip to content

This package allows you to add configurations and language support to your apps.

License

Notifications You must be signed in to change notification settings

robmllze/xyz_config

Repository files navigation

🇽🇾🇿 Config

pub package

This package allows you to add configurations and language support to your apps.

Quickstart

  1. Create a translations file at your_flutter_project/assets/translations/en_us.yaml.
greetings:
  HelloWorld: Hello World!
  1. Access the translations in your app:
  final translationFileReader = TranslationFileReader(
    translationsDirPath: ['translations'],
    fileType: ConfigFileType.YAML,
    fileReader: (filePath) => rootBundle.loadString(filePath),
  );

  await translationFileReader.read('en_us'.toLowerCase());

  print('greetings.HelloWorld'.tr());

Tip: File names are case sensitive on most Linux based systems like Firebase Hosting. Make sure to use the correct case for your file paths. As a rule of thumb, always use lowercase file paths.

Documentation

🔜 Documentation and video tutorials are coming soon. Feel free to contact me for more information.

Installation

Add this to your pubspec.yaml file:

dependencies:
  xyz_config: any # or the latest version

Contributing

Contributions are welcome. Here are a few ways you can help:

  • Report bugs and make feature requests.
  • Add new features.
  • Improve the existing code.
  • Help with documentation and tutorials.

License

This project is released under the MIT License. See LICENSE for more information.

Contact

Author: Robert Mollentze

Email: robmllze@gmail.com

About

This package allows you to add configurations and language support to your apps.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages