0Pricing
Vue Academy · Lesson

vue-i18n Setup and Message Files

createI18n(), locale JSON files, message syntax {name}, nested keys, fallback locale.

What Is i18n?

Internationalization (i18n) is building your app so it can present text in multiple languages. Vue I18n is the official-style library for translating Vue apps.

Instead of hardcoding English strings, you look up keys that resolve to the active language.

Installing Vue I18n

Add the package. For Vue 3 you use version 9 or later, which is built around the Composition API.

// terminal
// npm install vue-i18n

All lessons in this course

  1. vue-i18n Setup and Message Files
  2. useI18n Composable and t() Function
  3. Pluralization and Linked Messages
  4. Number, Date, and Currency Formatting
← Back to Vue Academy