# mojo-i18n

> - ability to dynamically reload i18n strings without reloading the application

Latest version **0.0.2** (published 2014-10-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install mojo-i18n
pnpm add mojo-i18n
yarn add mojo-i18n
bun add mojo-i18n
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2014-10-15 |
| First published | 2014-10-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | architectd |

## Links

- npm: https://www.npmjs.com/package/mojo-i18n
- Repository: https://github.com/mojo-js/mojo-i18n
- Issues: https://github.com/mojo-js/mojo-i18n/issues
- npm.io page: https://npm.io/package/mojo-i18n

## Dependencies (1)

- [bindable](https://npm.io/package/bindable.md) 0.6.x

## Recent versions

- 0.0.2 (latest) — 2014-10-15

## README

### Features

- ability to dynamically reload i18n strings without reloading the application

### Example


```javascript
var Application = require("mojo-application"),
views = require("mojo-views"),
paperclip = require("mojo-paperclip"),
i18n = require("mojo-i18n");

var app = new Application();
app.use(views, paperclip, i18n);

var view = new views.Base({
  message: "hello",
  paper: "{{ message | t | titlecase }}!"
});

// dynamically set the i18n translations
app.set("i18n.translations", {
  "en-us": {
    hello: "hello"
  },
  "es-ES": {    
    hello : "hola"
  }
});

app.set("i18n.locale", "en-ES");

console.log(view.render()); // Hola!

app.set("i18n.locale", "en-us");

console.log(view.render()); // Hello!


```

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