0PricingLogin
React Academy · Lesson

Pluralisation & Interpolation

Handle count-based plural forms and insert dynamic values into translated strings.

Welcome

In this lesson you will handle count-based plural forms and insert dynamic values into translated strings using i18next interpolation and plural support.

Interpolation Basics

Use double curly braces in your translation strings as placeholders. Pass an object with the variable values as the second argument to t().
// JSON: "greeting": "Hello, {{name}}!"
t('greeting', { name: 'Alice' }); // Hello, Alice!

All lessons in this course

  1. Setting Up react-i18next
  2. Using the useTranslation Hook
  3. Pluralisation & Interpolation
  4. Language Switcher & Lazy-Loading Translations
← Back to React Academy