I'm developing a mobile application using flutter / dart. The app needs to be localized using JSON files.
I need to handle the plural / gender in strings. Actually i'm using sprintf library, with some placeholder in the JSON code like:
{
...
"vehiclelabelKmTraveledReadable": "In %s Km",
...
}
so I replaced the '%s' placeholder with a variable value.
The problem is how to handle plurals, like
{
"vehiclePeriod": "Every %s month(s?)"
}
But if %s is 1, it's wrong. Does anybody knows how to manage this kind of cases?