primefaces / primelocale

MIT License
74 stars 108 forks source link

Add Croatian language support #142

Closed davidmalis closed 8 months ago

davidmalis commented 8 months ago

This PR adds a Croatian language support.

Keep in mind that Croatian language does not have simple rules for singular/plural wording, so the following labels are translated in such a way that the number does not affect the phrasing:

Instead of: "1 dostupan rezultat", "2 dostupna rezultata"

the label is passive: "Dostupno rezultata: 1", "Dostupno rezultata: 2"

More flexible approach would be introducing ICU Message Format support into Prime libraries, so that we could do stuff like this:

"aria": {
    "star": "{star, plural, one {1 zvijezda} few {{star} zvijezde} other {{star} zvijezdi}}"
 }

but that is out of the scope of this work.

melloware commented 8 months ago

Awesome thank you for the PR!

melloware commented 8 months ago

I hope you don't mind I added your translation to PrimeFaces: https://github.com/primefaces/primefaces/pull/11118

PF has way more labels that do the 3 libs so a lot of it is still in English in the second part of the file.

davidmalis commented 8 months ago

@melloware, I translated the second part you've mentioned: melloware/primefaces#368

melloware commented 8 months ago

@davidmalis you totally rock! The PF community thanks you.