Using Plurals with Parameter not in the text

More
2 weeks 6 days ago - 2 weeks 6 days ago #4143 by ocdunlap
Hi! First of all, I'm greatly enjoying the features offered by i2Localization for my current game project. It's really gone a long way in streamlining not just our localization process, but it's also been helpful for other aspects of our text content generation!

I'm currently running into a use case where it would be ideal to be able to specify different text templates based on a number, like with plurals the way they are currently implemented. However, I was wondering if would be possible to replicate something like the following:
[I2_Zero] No Things
[I2_One] One Thing
[I2_Plural] Some Things

Using a COUNT parameter that is not used inside the text to plug in the numeral, as opposed to something like:

[I2_Zero] {[COUNT]} Things
[I2_One] One Thing
[I2_Plural] {[COUNT]} Things
... Which works just fine.

If I attempt the first example, it collates all of the plural forms to generate a string like "[I2_Zero] No Things[I2_One]One Thing[I2_Plural] Some Things", presumably because it's unable to associate the COUNT variable with the pluralization without using the {[COUNT]} tag in the text in at least one place.

Is it possible to tell the Localize component what parameter it should be looking for for pluralization, regardless of what is featured in the text string? For my case, it would be really useful to use the pluralization features without having the literal number in the text output.

Thanks!
Last edit: 2 weeks 6 days ago by ocdunlap.

Please Log in or Create an account to join the conversation.

Time to create page: 0.100 seconds
Template by JoomlaShine