Skip to main content

CrystalDocs builds documentation for every shard, on request. The announcement: Documentation for every shard, on CrystalBits.

CrystalDocs

    Browse DocsCrystalShardsAbout

    github.com/crystal-i18n/i18n

    Types

    • I18n
      • Catalog
      • Config
      • Errors
        • InvalidLocale
        • MissingTranslation
      • Loader
        • Base
        • JSON
        • YAML
      • Locale
        • Fallbacks
        • Tag
      • Pluralization
        • Rule
          • Arabic
          • Breton
          • CentralMoroccoTamazight
          • Colognian
          • EastSlavic
          • Irish
          • Langi
          • Latvian
          • Lithuanian
          • Macedonian
          • Maltese
          • Manx
          • OneOther
          • OneTwoOther
          • OneUpToTwoOther
          • OneWithZeroOther
          • Other
          • Polish
          • Romanian
          • ScottishGaelic
          • Slovenian
          • UpperSorbian
          • Welsh
          • WestSlavic
      • TranslationsHash
      • TranslationsHashValues
    class

    I18n::Pluralization::Rule

    Inherits Reference < Object

    Abstract pluralization rule.

    A pluralization rule class provides a main #rule method that, given a count number, returns the corresponding plural catagory tag. Ideally returned values should be part of the common plural category tags that are defined by the CLDR (:zero, :one, :two, :few, :many and :other).

    Instance methods

    apply(count : Float | Int) : Symbol
    Source

    Nested types

    • I18n::Pluralization::Rule::Arabic
    • I18n::Pluralization::Rule::Breton
    • I18n::Pluralization::Rule::CentralMoroccoTamazight
    • I18n::Pluralization::Rule::Colognian
    • I18n::Pluralization::Rule::EastSlavic
    • I18n::Pluralization::Rule::Irish
    • I18n::Pluralization::Rule::Langi
    • I18n::Pluralization::Rule::Latvian
    • I18n::Pluralization::Rule::Lithuanian
    • I18n::Pluralization::Rule::Macedonian
    • I18n::Pluralization::Rule::Maltese
    • I18n::Pluralization::Rule::Manx
    • I18n::Pluralization::Rule::OneOther
    • I18n::Pluralization::Rule::OneTwoOther
    • I18n::Pluralization::Rule::OneUpToTwoOther
    • I18n::Pluralization::Rule::OneWithZeroOther
    • I18n::Pluralization::Rule::Other
    • I18n::Pluralization::Rule::Polish
    • I18n::Pluralization::Rule::Romanian
    • I18n::Pluralization::Rule::ScottishGaelic
    • I18n::Pluralization::Rule::Slovenian
    • I18n::Pluralization::Rule::UpperSorbian
    • I18n::Pluralization::Rule::Welsh
    • I18n::Pluralization::Rule::WestSlavic

    Advertisement

    Crystal jobs from CrystalGigs

    • Your posting here

      Reach Crystal developers on CrystalGigsFirst party

    CrystalDocs.org - Crystal Shard Documentation Hosting

    The CrystalBits newsletter

    Crystal tutorials, release news and community writing. One email when there is something new, never a stream.

    You will get one confirmation email to check the address is yours. Unsubscribe any time.

    GitHubCrystalShardsCrystalGigsCrystalBitsCrystal LanguageStatsSponsor

    The Bushido Collective builds and maintains this site.
    Licensed under the Apache License 2.0