4

Actually I was using Arb files for localization in that I don't know how to make and access array type value in .arb files with flutter

Joel
  • 180
  • 1
  • 11
  • you can find full details about it in here, https://docs.flutter.dev/development/accessibility-and-localization/internationalization also install the `intl` plugin in android studio, which will handle all the automated code generation process – towhid Dec 16 '21 at 15:18

1 Answers1

7

You can simply define your object as a String separated by some common separator:

  "months": "january:february:march:april:may:june:july:august:september:october:november:december",
  "@months": {
    "description": "months"
  },

Then, split the String into an array:

String monthsString = AppLocalizations.of(context)!.months;
List<String> months = monthsString.split(':');
Joel
  • 180
  • 1
  • 11
Petar Bivolarski
  • 1,599
  • 10
  • 19