VUE with TYPESCRIPT

Manage Vue i18n with Typescript

Internationalize your Vue project thanks to vue-i18n along with Typescript

Adrien Miquel
Vue.js Developers
Published in
4 min readMay 27, 2020

--

Your Vue project is running well for now. Greeeeat! 💥💥💥

All text is in English and it’s a good bet since you target all English speakers (a large part of the population). But it could be interesting to manage several languages to make your app world wide 🌐 and closer to your users 👩‍💻.

Photo by Aaron Burden on Unsplash

In this article, you will learn how to manipulate Vue i18n with Typescript. It’s a very handy and easy-to-use library to manage a multi-language app.

⚙ ️Setting things up

Installing vue-i18n starts with an npm command of course:

npm install vue-i18nyarn add vue-i18n #OR with yarnvue add i18n #OR with Vue CLI 3.x

Then in your main.ts file, you just need to add the following lines:

import Vue from 'vue'
import VueI18n

--

--

Vue.js Developers
Vue.js Developers

Published in Vue.js Developers

Helping web professionals up their skill and knowledge of Vue.js

Adrien Miquel
Adrien Miquel

Written by Adrien Miquel

Sr Frontend Engineer performing with Vue, TS/JS, GitLab | Writing articles monthly

Responses (1)