vuejs-localization
Installation
$ npm install vuejs-localization --save
Setup
var Vue = ;var Lang = ; //Notice that you need to specify the lang folder, in this case './lang'Lang; Vue;
Lang Folder
└── lang ├── en | └──messagesjs └── pt └──messagesjs
Lang file
//messages.jsmoduleexports = hello_world : 'Hellow World!'
Usage
$langfilekey
{{$lang.messages.hello_world}}
Results in:
Hello World
Change localization (reactive)
//inside vue instancethis$lang