Jesway / flutter_translate

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

Use ELSE when 0 or 1 not found at plural translate #35

Closed ewertonrp closed 4 years ago

ewertonrp commented 4 years ago

Almost every time the value at 0 key is equal to the value at ELSE key. So, when 0 key is not set the return value will be the one at ELSE key. Ex.:

{
  "cat": {
    "1": "cat",
    "else": "cats"
  }
}
bratan commented 4 years ago

@ewertonrp - Thanks for the pull request.

Yes it makes sense to return ELSE when a specific plural key does not exist.