Skip to content

desaroger/loopback-i18n

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"]
}

About

i18n middleware for loopback

Resources

License

Stars

Watchers

Forks

Packages

No packages published