Open frojnd opened 4 years ago
For question 1, currently, need to write a helper function which contain many switch cases to map with a specific function
Maybe enhance for the future with following solutions.
S.of(context).localized(name, args) eg.
S.of(context).localized('card_category1.test')
For question 2, Thinking of using json structure
{
"card_category1": {
"test": "test"
"abc": "abc"
},
"card_category2": {
"test": "Another test"
"abc": "Another abc"
}
}
But, the generated function name will be tricky. Thats why we need a generalize function like S.of(context).localized(name, args)
Hi.
1) What would be the best way to get all the strings and save them in array? So I could use it in ListView?
2) Is it possible to "categorize" strings inside string_en.json file? Or if not, what would be the best logic to save into array just strings that starts with cardcategory1?