Issues with JSON plurals in Crowdin

Hi! I recently ran into an issue with plural localization in Crowdin. I have something along the following in my source JSON:

"gameCount": {
    "one": "{{count}} Game",
    "other": "{{count}} Games"
}

However, I do not get any plural options in Crowdin, as I have seen other users have. Any tips appreciated! ^^

Hi @RichardKanshen

The default JSON doesn’t support pluralization

Maybe try uploading it as i18next or go?

Both work with plurals. For go, this should work well:

"cases": {
                        "one": {
                            "msg": "{Years} year"
                        },
                        "other": {
                            "msg": "{Years} years"
                        }
                    }

Or, alternatively, this one also should be working:

 "cases": {
                        "one": "One book remaining!",
                        "other": "There are {N} more books remaining!"
                    }

Hi Richard! The issue is highly probable due to the file type setting. Please check your “Parser Configuration” under Project Settings for your JSON files. (as shown in the screenshot) Ensuring the file type is set to “i18next” is crucial, as this tells Crowdin to correctly interpret plural forms like “one” and “other.”

1 Like