Socket
Socket
Sign inDemoInstall

@os-team/i18next-react-native-language-detector

Package Overview
Dependencies
514
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@os-team/i18next-react-native-language-detector

The i18next language detector, which is used to detect the user's language in React Native.


Version published
Maintainers
1
Weekly downloads
3,192
decreased by-25.91%

Weekly downloads

Readme

Source

@os-team/i18next-react-native-language-detector NPM version BundlePhobia

The i18next language detector, which is used to detect the user's language in React Native.

Usage

Install the package using the following command:

yarn add @os-team/i18next-react-native-language-detector

Example of usage:

import i18next from 'i18next';
import { initReactI18next } from 'react-i18next';
import RNLanguageDetector from '@os-team/i18next-react-native-language-detector';

i18next
  .use(RNLanguageDetector) // Add the language detector
  .use(initReactI18next)
  .init({
    fallbackLng: 'en',
    supportedLngs: ['en', 'ru'],
    ns: [],
    defaultNS: undefined,

    resources: {
      en: {
        common: require('./locales/en/common.json'),
      },
      ru: {
        common: require('./locales/ru/common.json'),
      },
    },

    interpolation: {
      escapeValue: false,
    },
  });

export default i18next;

FAQs

Last updated on 29 Feb 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc