Thanks for checking out our work! :)
> I have not yet encountered one example where the text is actually being localized, just examples in English.
Haha, yeah, our website is not localized itself. It may sound funny, but we believe our target audience at this stage of the project development is pretty much English-speaking, so we didn't invest in localization of it :)
> I'd like to see an example on the first page on how would I add a translation for a language that requires different wording for numbers 2 to 5 for example.
Polish is an example of such language. An example of a plural variant selector with it would be:
shared-photos =
{ $user_name } { $photo_count ->
[one] dodała jedno zdjęcie
[few] dodała { $photo_count} zdjęcia
*[many] dodała { $photo_count } zdjęć
}.
The categories come from http://www.unicode.org/cldr/charts/33/supplemental/language_...And we use just standardized `Intl.PluralRules` that gets the correct category - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
> Also, why [0] and then [one] ?
This is a "smart selector". By default, since the selector is a number we guessed that it should be run via plural selector and then matches against result category list (hence one,few,many)
But on top of that we also experience a common use case where the UX wants to add a special form of the sentence for particular values - usually for 0, like this:
shared-photos =
{ $user_name } { $photo_count ->
[0] hasn't added any photos yet
[one] added one photo
*[other] added { $photo_count } photos
}.
Without `[0]`, in the example above (English), the `0` value would end up in `other` plural category.Hope that helps!