Gathering detailed insights and metrics for storybook-addon-i18next
Gathering detailed insights and metrics for storybook-addon-i18next
Gathering detailed insights and metrics for storybook-addon-i18next
Gathering detailed insights and metrics for storybook-addon-i18next
npm install storybook-addon-i18next
Typescript
Module System
Node Version
NPM Version
52.4
Supply Chain
68.2
Quality
70.2
Maintenance
50
Vulnerability
97.6
License
JavaScript (100%)
Total Downloads
1,590,667
Last Day
316
Last Week
1,688
Last Month
6,692
Last Year
105,678
MIT License
13 Stars
74 Commits
8 Forks
1 Watchers
5 Branches
2 Contributors
Updated on Jun 11, 2024
Minified
Minified + Gzipped
Latest Version
1.3.0
Package Id
storybook-addon-i18next@1.3.0
Size
6.02 kB
NPM Version
6.14.2
Node Version
12.13.1
Published on
Mar 16, 2020
Cumulative downloads
Total Downloads
7
1
17
Storybook Addon i18next allows your stories to be displayed in different language with i18next.
NOTE: It only support React for now.
Install the following npm module:
1npm i --save-dev storybook-addon-i18next
or with yarn:
1yarn add -D storybook-addon-i18next
Then, add following content to .storybook/addons.js
1import 'storybook-addon-i18next/register';
There's only one decorator for configuration.
Import and use the withI18next
decorator in your config.js
file.
1import { withI18next } from 'storybook-addon-i18next';
An configuration object for i18next.
A key-value pair of language codes and display name
Example:
1{ 2 en: 'English', 3 'zh-TW': '繁體中文', 4}
Simply import the Storybook i18next Addon in the addons.js
file in your .storybook
directory.
1import 'storybook-addon-i18next/register';
Please refer to i18next-configuration-options.
Example in .storybook/config.js
:
1import i18n from 'i18next'; 2import { initReactI18next } from 'react-i18next'; 3import Backend from 'i18next-xhr-backend'; 4import LanguageDetector from 'i18next-browser-languagedetector'; 5 6i18n 7 .use(Backend) 8 .use(LanguageDetector) 9 .use(initReactI18next) 10 .init({ 11 whitelist: ['en', 'zh-TW'], 12 lng: 'en', 13 fallbackLng: 'en', 14 interpolation: { 15 escapeValue: false, 16 }, 17 }); 18 19addDecorator( 20 withI18next({ 21 i18n, 22 languages: { 23 en: 'English', 24 'zh-TW': '繁體中文', 25 }, 26 }) 27); 28 29// Add <Suspense> after withI18next decorator 30addDecorator((story, context) => ( 31 <Suspense fallback="Loading...">{story(context)}</Suspense> 32));
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
9 existing vulnerabilities detected
Details
Reason
Found 0/12 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- 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
Score
Last Scanned on 2025-05-05
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 MoreLast Day
271.8%
316
Compared to previous day
Last Week
25.6%
1,688
Compared to previous week
Last Month
-17.7%
6,692
Compared to previous month
Last Year
-50.8%
105,678
Compared to previous year