Jesway / flutter_translate

Flutter Translate is a fully featured localization / internationalization (i18n) library for Flutter.
MIT License
401 stars 118 forks source link

Added support for double plural (Duals) for languages like Arabic #43

Closed Ayman-Kortobaa closed 4 years ago

Ayman-Kortobaa commented 4 years ago

It's a simple change to add support for languages with duals or double plural. The list of languages included on the wikipedia page here.

Thanks for the great package!

Ayman-Kortobaa commented 4 years ago

For clarification I have only changed 2 lines in 2 files, the rest of changes are due to dartfmt. More precisely I added these two lines: in lib/constants.dart

  static const String pluralTwo = '2';

and in lib/localization.dart

      case 2:
        return Constants.pluralTwo;
bratan commented 4 years ago

Thanks for the pull request, however I will not merge this since the code formatting should not be changed. Additionally the examples and the documentation would need to be updated as well.

Ayman-Kortobaa commented 4 years ago

Thanks for the feedback. Totally understandable, I will add another PR without changing code formatting and updating docs and examples.

bratan commented 4 years ago

Thanks @Ayman-Kortobaa