PLURAL localization

Jump to navigation Jump to search

PLURAL localization

Was "pointed" here after reading Plural#Localising plural rules for a language. In Latvian, we have some problems with PLURAL. The wikicode could be like this (we have a template, which does kind of the same as PLURAL, and no mistakes have been noticed in last 5 years):

{{#ifexpr: (abs({{{1}}}) mod 10 = 1) and (abs({{{1}}}) mod 100 != 11)
| {{{2}}}<!-- word in singular; in [[Plural#Localising plural rules for a language]] described as "form1" -->
| {{{3}}}<!-- word in plural; in [[Plural#Localising plural rules for a language]] described as "form2" -->}}

Examples (included PLURAL function to enable checking @lvwiki):

PLURAL Number Should be Currently is
pieces 0 pieces piece
piece 1 piece pieces
pieces 11 pieces piece
pieces 42 pieces pieces
pieces 321 piece pieces
pieces 322 pieces pieces
pieces 500 pieces piece

Can this been fixed?

Edgars2007 (talk)16:46, 24 December 2014

The current rules come from CLDR and are:

<pluralRules locales="lv prg">
    <pluralRule count="zero">n % 10 = 0 or n % 100 = 11..19 or v = 2 and f % 100 = 11..19 @integer 0, 10~20, 30, 40, 50, 60, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …</pluralRule>
    <pluralRule count="one">n % 10 = 1 and n % 100 != 11 or v = 2 and f % 10 = 1 and f % 100 != 11 or v != 2 and f % 10 = 1 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 0.1, 1.0, 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 10.1, 100.1, 1000.1, …</pluralRule>
    <pluralRule count="other"> @integer 2~9, 22~29, 102, 1002, … @decimal 0.2~0.9, 1.2~1.9, 10.2, 100.2, 1000.2, …</pluralRule>
</pluralRules>

You would have to convince CLDR to change the rules. We only override CLDR rules in exceptional cases.

Nike (talk)00:44, 25 December 2014

You do not have permission to edit this page, for the following reason:

The action you have requested is limited to users in the group: Users.


You can view and copy the source of this page.

Return to Thread:Support/PLURAL localization/reply (2).