Gathering detailed insights and metrics for @dattran92/storybook-addon-i18next
Gathering detailed insights and metrics for @dattran92/storybook-addon-i18next
Gathering detailed insights and metrics for @dattran92/storybook-addon-i18next
Gathering detailed insights and metrics for @dattran92/storybook-addon-i18next
React Storybook addon for i18next
npm install @dattran92/storybook-addon-i18next
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
720
Last Day
1
Last Week
5
Last Month
12
Last Year
102
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
@dattran92/storybook-addon-i18next@1.3.0
Unpacked Size
22.23 kB
Size
6.20 kB
File Count
11
NPM Version
6.12.1
Node Version
12.13.1
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
25%
5
Compared to previous week
Last Month
-20%
12
Compared to previous month
Last Year
-20.3%
102
Compared to previous year
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 More