Skip to content

Plural Categories

For ICU pluralization use tm() from Translating Text — it is the primary API. usePluralize() exposes one additional utility: pluralCategory, which returns the raw CLDR category for a count value.

ts
import { usePluralize } from 'vue-i18n-kit'

const { pluralCategory } = usePluralize()

Category lookup (pluralCategory)

pluralCategory(count) returns the raw CLDR plural category string for count in the active locale. Useful for applying CSS classes or driving conditional rendering.

ts
// English locale
pluralCategory(1) // 'one'
pluralCategory(5) // 'other'

// Russian locale
pluralCategory(1) // 'one'
pluralCategory(3) // 'few'
pluralCategory(5) // 'many'