Gathering detailed insights and metrics for @sandhose/i18next-fs-backend
Gathering detailed insights and metrics for @sandhose/i18next-fs-backend
Gathering detailed insights and metrics for @sandhose/i18next-fs-backend
Gathering detailed insights and metrics for @sandhose/i18next-fs-backend
i18next-fs-backend is a backend layer for i18next using in Node.js and for Deno to load translations from the filesystem.
npm install @sandhose/i18next-fs-backend
Typescript
Module System
Node Version
NPM Version
JavaScript (98.82%)
Pug (1.07%)
TypeScript (0.11%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
109 Stars
142 Commits
15 Forks
4 Watchers
1 Branches
10 Contributors
Updated on Jul 06, 2025
Latest Version
1.1.0-0
Package Id
@sandhose/i18next-fs-backend@1.1.0-0
Unpacked Size
234.78 kB
Size
55.68 kB
File Count
22
NPM Version
6.14.4
Node Version
12.17.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
This is an i18next backend to be used in Node.js and Deno. It will load resources from the file system.
It's based on the deprecated i18next-node-fs-backend and can mostly be used as a drop-in replacement.
It will load resources from filesystem. Right now it supports following filetypes:
# npm package
$ npm install i18next-fs-backend
Wiring up:
1import i18next from 'i18next'; 2import Backend from 'i18next-fs-backend'; 3 4i18next.use(Backend).init(i18nextOptions);
for Deno:
1import i18next from 'https://deno.land/x/i18next/index.js' 2import Backend from 'https://deno.land/x/i18next_fs_backend/index.js' 3 4i18next.use(Backend).init(i18nextOptions);
1{ 2 // path where resources get loaded from, or a function 3 // returning a path: 4 // function(lngs, namespaces) { return customPath; } 5 // the returned path will interpolate lng, ns if provided like giving a static path 6 loadPath: '/locales/{{lng}}/{{ns}}.json', 7 8 // path to post missing resources 9 addPath: '/locales/{{lng}}/{{ns}}.missing.json' 10}
Options can be passed in:
preferred - by setting options.backend in i18next.init:
1import i18next from 'i18next'; 2import Backend from 'i18next-fs-backend'; 3 4i18next.use(HttpApi).init({ 5 backend: options, 6});
on construction:
1import HttpApi from 'i18next-fs-backend'; 2const Backend = new Backend(null, options);
via calling init:
1import Backend from 'i18next-fs-backend'; 2const Backend = new Backend(); 3Backend.init(null, options);
1// i18n.js 2const { join } = require('path') 3const { readdirSync, lstatSync } = require('fs') 4const i18next = require('i18next') 5const Backend = require('i18next-fs-backend') 6i18next 7 .use(Backend) 8 .init({ 9 // debug: true, 10 initImmediate: false, 11 fallbackLng: 'en', 12 lng: 'en', 13 preload: readdirSync(join(__dirname, '../locales')).filter((fileName) => { 14 const joinedPath = join(join(__dirname, '../locales'), fileName) 15 const isDirectory = lstatSync(joinedPath).isDirectory() 16 return isDirectory 17 }), 18 ns: 'backend-app', 19 defaultNS: 'backend-app', 20 backend: { 21 loadPath: join(__dirname, '../locales/{{lng}}/{{ns}}.json') 22 } 23 })
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
2 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 3
Reason
Found 2/21 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
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