loopback-i18n

1.1.4 • Public • Published

Loopback i18n middleware

Travis-CI

This is a simple middleware using mashpie/i18n package. By default is set to accept en locale and use the folder common/i18n.

Author: Roger Fos Soler (desaroger23@gmail.com)

Usage

First, install the library:

$ npm i --save loopback-i18n

Add the middleware to your middleware.json:

{
    "initial": {
        "loopback-i18n#i18n": {}
    }
}

Or you can use it throw code:

let loopbackI18n = require('loopback-i18n');
app.middleware('initial', loopbackI18n());

Options

The options are passed directly to the mashpie package. You can see all available options here. We define this default options object:

{
    "directory": "common/i18n",
    "locales": ["en"]
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.4
    66
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.4
    66
  • 1.0.0
    0

Package Sidebar

Install

npm i loopback-i18n

Weekly Downloads

66

Version

1.1.4

License

MIT

Last publish

Collaborators

  • desaroger