Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
react-native-simple-i18n
Advanced tools
Changelog
2.0.0 (2020-05-04)
Readme
Small i18n lib for react-native based on react-native-localize, i18n-js and lodash.memoize
This library was inspired by How to use React Native Localize in React Native apps (written by Aman Mittal) so please go and leave this guy some 👏.
Disclaimer: This library only supports translations, it does NOT support cultural settings (currency, dates, times, etc)
npm install -S react-native-simple-i18n
import React from 'react';
+ import { I18nProvider, useI18nProvider } from 'react-native-simple-i18n';
import ReduxProvider from 'src/components/ReduxProvider';
import Main from 'src/components/Main';
+ const messages = {
+ en: () => require('src/i18n/en.json'),
+ es: () => require('src/i18n/es.json'),
+ fr: () => require('src/i18n/fr.json'),
+ };
function App() {
+ const i18n = useI18nProvider(messages);
return (
<>
<ReduxProvider>
+ <I18nProvider value={i18n}>
<Main />
+ </I18nProvider>
</ReduxProvider>
</>
);
}
export default App;
{
"active": "Activo",
"inactive": "Inactivo",
"unknown": "Desconocido"
}
import React from 'react';
import { Text, View } from 'react-native';
+ import { useI18n } from 'react-native-simple-i18n';
function Main() {
+ const { translate } = useI18n();
return (
<View>
<Text>
+ {translate('active')}
</Text>
</View>
);
}
export default Main;
MIT © jonathanpalma
FAQs
Small i18n lib for react-native based on react-native-localize and i18n-js
The npm package react-native-simple-i18n receives a total of 1 weekly downloads. As such, react-native-simple-i18n popularity was classified as not popular.
We found that react-native-simple-i18n demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.