Plural Class#
Chooses between the two forms of a message that counts something.
public static class Plural
Inheritance System.Object → Plural
Remarks#
Two forms cover every language Verso ships in: German and Spanish need a singular and a plural, and Japanese and Chinese need neither. A language with more forms, such as Russian or Polish, does not fit here and would need a real plural selector keyed on the count and the language together. Adding one of those means replacing this, not adding a third key.
The alternative, building a word out of a stem and an s, does not survive translation
at all: the plural of a German noun is not its singular with a letter on the end. Neither
does cell(s), which no other language can copy.
It lives here, in the assembly every other one already references, because the notebook interface, the engine, the command line, and each kernel all count something. An extension writing its own messages can use it for the same reason.
Methods#
Of(int, string, string) Method#
Picks the singular for exactly one, and the plural for anything else.
public static string Of(int count, string one, string other);
Parameters#
count System.Int32
How many things the message is about.
one System.String
The message written for a single thing.
other System.String
The message written for any other number of them.