# xin-lang

> Xin multi languages

Latest version **1.1.1** (published 2018-09-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install xin-lang
pnpm add xin-lang
yarn add xin-lang
bun add xin-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.1.1 |
| Published | 2018-09-20 |
| First published | 2018-09-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ganesha |
| Maintainers | reekoheek |

## Links

- npm: https://www.npmjs.com/package/xin-lang
- Repository: https://github.com/xinix-technology/xin-lang
- Homepage: https://github.com/xinix-technology/xin-lang#readme
- Issues: https://github.com/xinix-technology/xin-lang/issues
- npm.io page: https://npm.io/package/xin-lang

## Dependencies (1)

- [@xinix/xin](https://npm.io/package/@xinix/xin.md) ^2.6.2

## Recent versions

- 1.1.1 (latest) — 2018-09-20
- 1.1.0 — 2018-09-20

## README

# xin-lang

```sh
npm i xin-lang
```

## How to use

Create instance of `xin-lang` at global.

```js
import { Lang } from 'xin-lang';

let lang = window.lang = new Lang();
lang.putTranslations('en', {
  'Home': 'Home',
});
lang.putTranslations('en', {
  'Home': 'Rumah',
});
```

To use programmatically in javascript

```js
let result = window.lang.translate('Home');
console.log(result); // show me the result
```

To use from component template scope

```html
<a href="#">[[__global.lang.translate("Home")]]</a>
```

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