Portal:ar

From translatewiki.net
Important notice: The translations to some different variants (arb, ary, arq, aeb, arz, ajp, acm, etc.) of this language are, by their nature, incomplete translations. These translations will only be made in those messages that are different from the base language (ar : Arabic) to avoid unnecessary duplicates (and therefore, avoid having to update in two places instead of only one). Thank you. (This applies to messages from MediaWiki including related extensions like Wikimedia, Miraheze, BlueSpice, as well as Phabricator, Toolserver Intuition, WikimediaMobile, Encyclopedia of Life and OpenStreetMap. For other projects, this may differ.)

Plural rules

Plural rules (and subsets of examplar values for integers and values with decimals) from here.

<!-- 6: zero,one,two,few,many,other -->
<pluralRules locales="ar">
    <pluralRule count="zero"> n = 0
        @integer 0
        @decimal 0.0, 0.00, 0.000, 0.0000
    </pluralRule>
    <pluralRule count="one"> n = 1
        @integer 1
        @decimal 1.0, 1.00, 1.000, 1.0000
    </pluralRule>
    <pluralRule count="two"> n = 2
        @integer 2
        @decimal 2.0, 2.00, 2.000, 2.0000
    </pluralRule>
    <pluralRule count="few"> n % 100 = 3..10
        @integer 3~10, 103~110, 1003,         @decimal 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 103.0, 1003.0,     </pluralRule>
    <pluralRule count="many"> n % 100 = 11..99
        @integer 11~26, 111, 1011,         @decimal 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 111.0, 1011.0,     </pluralRule>
    <pluralRule count="other">
        @integer 100~102, 200~202, 300~302, 400~402, 500~502, 600, 1000, 10000, 100000, 1000000,         @decimal 0.1~0.9, 1.1~1.7, 10.1, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0,     </pluralRule>
</pluralRules>

This means that Arabic plurals are marked in Mediawiki translations in that order, with up to six forms, which are distinguished only for integer values:

{{PLURAL:$variable|form for zero|form for one|form for two|form for (3 to 10) plus hundreds|form for (11 to 99) plus hundreds|default form}}

You may omit some of the leading forms, except the last default form which will always apply if there's no match of the value with any other specified forms which are mutually exclusive (including any value that is not an integer, and any value that is a non-zero multiple of 100). However, each specified form may be an empty string and will not fallback to the default form. This also means that you must include the specified $variable within the 4th, 5th and last specified forms to render that effective value (whereas for zero, one and two, you may just translate these forms with regular words omitting that variable).

See also