Package Exports
- koa-languages
- koa-languages/src/app.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (koa-languages) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Welcome to koa-languages
Browser Support
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
---|---|---|---|---|---|
Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |
Install Command:
npm install koa-languages --save
Use:
import Languages from 'koa-languages';
/* Simulated KOA Network Framework Routing,
* lang <en-US ru-RU zh-CN zh-TW>
*/
const lang = socket.request.header['accept-language'].split(',')[0]);
new Languages(lang, (socket) => {
socket.body = socket.hello;
})