New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ahmedrowaihi/react-native-i18n-storage

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ahmedrowaihi/react-native-i18n-storage

React Native I18n Storage is a simple library to manage your app's I18nManager settings and language by keeping them in sync with local storage from the initial native app launch!.

  • 0.1.0
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-i18n-storage

Sync your I18n Manager from Native Side Without hassle!

Why?

React Native I18n Storage is a simple library to manage your app's I18nManager settings and language by keeping them in sync with local storage from the initial native app launch! Which means that you can change the locale from native side and the app will restart with the new locale from the local storage!

Convntions

  • Locale and Layout are initialized from the first native app launch, and then they are kept in sync with the local storage.
  • saves huge performance cost by not using hooks or context
  • keeps your code clean and simple
  • use Locale and RTL IN/OUT of React Components and they will be kept in sync with the local storage
  • No need to change your code logic
  • No need to change your code structure or architecture
  • No need to change your code style
  • No need to change your code design pattern
  • No need to change your code design pattern
  • No need to change your code anything 😅

Prerequisites

  • @react-native-async-storage/async-storage
  • react-native-restart

if you have not installed them yet, you can install them by running the following commands:

// you can use yarn instead of npm
npm install @react-native-async-storage/async-storage react-native-restart

Installation

// you can use yarn instead of npm
npm install react-native-i18n-storage

Usage

Change the locale from native side and Restart the app

import { ChangeNativeLocale } from '@ahmedrowaihi/react-native-i18n-storage';

await ChangeNativeLocale(true, 'ar');

Roadmap

  • Allow to change the locale from native side
  • Add example of changing the locale from native side
  • On App Launch, check if the locale is changed from native side (iOS)
  • On App Launch, check if the locale is changed from native side (Android)
  • On App Launch implementations to example
  • Write tests
  • Write docs

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Keywords

FAQs

Package last updated on 20 Apr 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc