Gathering detailed insights and metrics for @winstrike/next-i18next-koa
Gathering detailed insights and metrics for @winstrike/next-i18next-koa
Gathering detailed insights and metrics for @winstrike/next-i18next-koa
Gathering detailed insights and metrics for @winstrike/next-i18next-koa
npm install @winstrike/next-i18next-koa
Typescript
Module System
Min. Node Version
Node Version
NPM Version
54.5
Supply Chain
84.7
Quality
78.2
Maintenance
50
Vulnerability
100
License
JavaScript (100%)
Total Downloads
108,073
Last Day
80
Last Week
310
Last Month
982
Last Year
11,008
6 Stars
386 Commits
3 Forks
2 Watching
15 Branches
Latest Version
0.1.14
Package Id
@winstrike/next-i18next-koa@0.1.14
Unpacked Size
89.91 kB
Size
23.15 kB
File Count
59
NPM Version
6.4.1
Node Version
10.15.3
Cumulative downloads
Total Downloads
Last day
3.9%
80
Compared to previous day
Last week
53.5%
310
Compared to previous week
Last month
-31.7%
982
Compared to previous month
Last year
10.6%
11,008
Compared to previous year
11
1
31
The easiest way to translate your NextJs apps. With Koa support only. Forked from next-i18next
.
next-i18next-koa
is a fork of next-i18next
with Koa server support only. This fork uses koa-i18next-middleware-fixed
instead of i18next-express-middleware
.
npm i @winstrike/next-i18next-koa
or yarn add @winstrike/next-i18next-koa
nextI18NextMiddleware()
returns an array of middleware. You should use all of them, as in this example:
1const Koa = require("koa"); 2const Router = require("koa-router"); 3const serve = require("koa-static"); 4const mount = require("koa-mount"); 5const nextApp = require("next"); 6const nextI18NextMiddleware = require("@winstrike/next-i18next-koa/middleware"); 7 8const nextI18Next = require("./lib/i18n"); 9 10const app = nextApp({ 11 dev: process.env.NODE_ENV !== "production", 12}); 13const handle = app.getRequestHandler(); 14 15app.prepare().then(() => { 16 const server = new Koa(); 17 const router = new Router(); 18 19 // Access to locales for preloading them from client-side i18next 20 server.use(mount("/locales", serve("./locales"))); 21 22 router.get("*", async (ctx) => { 23 await handle(ctx.req, ctx.res); 24 ctx.respond = false; 25 }); 26 27 // Use all of middlewares 28 const middlewares = nextI18NextMiddleware(nextI18Next); 29 middlewares.forEach((middleware) => { 30 server.use(middleware); 31 }); 32 33 server.use(router.routes()); 34 server.listen(port, () => { 35 console.log(`> Ready on http://localhost:${port}`); 36 }); 37});
You can find other information about next-i18next
in the original readme.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/27 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
94 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More