How can we use nested objects in arb files? Flutter gen doesn't work if there's a nested object.
l10n.yaml
arb-dir: lib/l10n
template-arb-file: app_en.arb
output-localization-file: app_localizations.dart
output-class: AppLocalizations
synthetic-package: false
pubspec.yaml
flutter:
generate: true
app_en.arb
"clients": {
"label": "Client",
"title": {
"add": "New Client",
"details": "Client Details",
"edit": "Edit Client",
"manage": "Manage Clients"
}
},
app_bn.arb
"clients": {
"label": "ক্লায়েন্ট",
"title": {
"add": "নতুন ক্লায়েন্ট",
"details": "ক্লায়েন্ট ডিটেলস",
"edit": "এডিট ক্লায়েন্ট",
"manage": "ক্লায়েন্ট পরিচালনা"
}
},
If I run the files to generate the translation flutter throws an exception.
Exception: The value of "clients" is not a string.
Can't find any solution with nested objects in arb files. I found some ways to do it with JSON files. But I want to use arb files.
Is there any way to do it with arb files?
As of the time of writing this comment there is no way to do that
However one trick I particularly use to organize sections goes like this :
the @ helps me find sections Hope This Helps