# vuejs-lang

> Vue language plugin

Latest version **1.0.0** (published 2017-09-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install vuejs-lang
pnpm add vuejs-lang
yarn add vuejs-lang
bun add vuejs-lang
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-09-17 |
| First published | 2017-09-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | kandries |
| Maintainers | kandries |
| Keywords | vue, vuejs, localization, language |

## Links

- npm: https://www.npmjs.com/package/vuejs-lang
- npm.io page: https://npm.io/package/vuejs-lang

## Recent versions

- 1.0.0 (latest) — 2017-09-17

## README

# vuejs-localization

## Installation

```
$ npm install vuejs-localization --save
```

## Setup
```js
var Vue = require('vue');
var Lang = require('vuejs-localization');

//Notice that you need to specify the lang folder, in this case './lang'
Lang.requireAll(require.context('./lang', true, /\.js$/));

Vue.use(Lang);
```

## Lang Folder
```js
└── lang
    ├── en
    |  └──messages.js
    └── da
       └──messages.js

```
## Lang file
```js
//messages.js
module.exports = {
  hello_world : 'Hello World!'
}
```

## Usage

```js
$lang.{file}.{key}
```

```html
<h1>{{$lang.messages.hello_world}}</h1>
```
Results in:
```html
<h1>Hello World</h1>
```

## Change localization (reactive)
```js
//inside vue instance
this.$lang.setLang('pt')
```

---
_Source: https://npm.io/package/vuejs-lang · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
