Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
rosetty-react
Advanced tools
[![Maintainability](https://api.codeclimate.com/v1/badges/82e2c932c7dde770cdd4/maintainability)](https://codeclimate.com/github/flexper/rosetty-react/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/82e2c932c7dde770cdd4/test_covera
Complete Intl/I18n solution for React base on Rosetty
//In your app.js file, add the following code:
import { RosettyProvider, locales as rosettyLocales } from 'rosetty-react';
const locales = { fr: { dict: {}, locale: rosettyLocales.fr } };
const defaultLanguage = 'fr';
const App = ({ children }) => (
<RosettyProvider locales={locales} defaultLanguage={defaultLanguage}>
{children}
</RosettyProvider>
);
module.exports = App;
//In your components file, add the following code:
import { useRosetty } from 'rosetty-react';
const Home = () => {
const { t } = useRosetty();
return <h1>{t('home')}</h1>;
};
module.exports = Home;
Options
Field Name | Type | Description |
---|---|---|
locales | Record<string, Language> | Specify dictionnary and locale to use for each lang |
defaultLanguage | string? | Specify default language to use (should be the same as config) |
Return: Rosetty Context HOC
Return a component who instantiate the Rosetty Context.
Return: Record<string, Locale>
Return I18n locales from rosetty
This package use TSdx. Please check documentation to update this package.
FAQs
[![Maintainability](https://api.codeclimate.com/v1/badges/82e2c932c7dde770cdd4/maintainability)](https://codeclimate.com/github/qlaffont/rosetty-react/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/82e2c932c7dde770cdd4/test_cover
The npm package rosetty-react receives a total of 955 weekly downloads. As such, rosetty-react popularity was classified as not popular.
We found that rosetty-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.