Ok, maybe the question is not very precise. But, I figured out that the only way to have something similar to Android's <string-array>
for translation in Flutter is to use select
. For instance,
"pronoun": "{gender, select, male{he} female{she} other{they}}",
"@pronoun": {
"description": "A gendered message",
"placeholders": {
"gender": {
"type": "String"
}
}
}
Now, how can I get the array of keys that are used in creating this definition? In the upper case, the answer should be [male, female, other]
.