# marengo-language

> #### Settings API | Prop | Description | Default | ------------- | ------------- | ------------- | | current | Set current language to display | pt_BR | | packages | Object to store languages packages | {} |

Latest version **2.0.1** (published 2018-05-28) · ISC license · 0 weekly downloads

## Install

```sh
npm install marengo-language
pnpm add marengo-language
yarn add marengo-language
bun add marengo-language
```

## 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 | 2.0.1 |
| Published | 2018-05-28 |
| First published | 2018-05-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | cbo317110 |
| Keywords | marengo |

## Links

- npm: https://www.npmjs.com/package/marengo-language
- Repository: https://github.com/cbo317110/marengo-language
- Homepage: https://github.com/cbo317110/marengo-language#readme
- Issues: https://github.com/cbo317110/marengo-language/issues
- npm.io page: https://npm.io/package/marengo-language

## Dependencies (1)

- [moon-helper](https://npm.io/package/moon-helper.md) 0.0.4

## Recent versions

- 2.0.1 (latest) — 2018-05-28
- 2.0.0 — 2018-05-27
- 1.0.5 — 2018-05-18
- 1.0.4 — 2018-05-18
- 1.0.3 — 2018-05-13
- 1.0.1 — 2018-05-05
- 0.0.7 — 2018-05-05
- 0.0.6 — 2018-05-02

## README

### Marengo Language

#### Settings API
| Prop  | Description | Default
| ------------- | ------------- | ------------- |
| current  | Set current language to display  | pt_BR |
| packages  | Object to store languages packages | {} |

#### Method: $
Render a language string

| Param  | Description | Example |
| ------------- | ------------- | ------------- |
| word  | key from language package to be renderized | $('foo') |
| data  | customize renderization, replacing variables, or even activating DOM events | $('foo {x}', {x: 'bar'}) |

### Draft Example 

##### settings.js
```typescript
import pt_BR from './lang/pt_BR.json'
import en_US from './lang/en_US.json'

export default {
  language: {
    current: 'en_ES',
    packages: {
      pt_BR,
      en_US,
      es_ES: {
        'example': 'ejemplo'
      }
    }
  }
}
```

##### plugins.js
```typescript
import language from 'marengo-language'

export default {
  language
}
```

##### component.vue
```vue
<template>
  <div>
    {{ $('example') }}
  </div>
</template>

<script>
  import m from 'marengo'
  import s from './settings'
  import p from './plugins'
  export default m({
    // ...
  }, s, p)
</script>
```

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