Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@os-team/i18next-tld-language-detector

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@os-team/i18next-tld-language-detector

The i18next language detector, which is used to detect the user's language by a top-level domain (TLD).

  • 1.1.0
  • npm
  • Socket score

Version published
Weekly downloads
42
increased by68%
Maintainers
1
Weekly downloads
 
Created
Source

@os-team/i18next-tld-language-detector NPM version BundlePhobia

The i18next language detector, which is used to detect the user's language by a top-level domain (TLD).

Usage

Install the package using the following command:

yarn add @os-team/i18next-tld-language-detector

Example of usage:

import i18next from 'i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
import HttpBackend from 'i18next-http-backend';
import { initReactI18next } from 'react-i18next';
import tldLanguageDetector from '@os-team/i18next-tld-language-detector';

const languageDetector = new LanguageDetector();
languageDetector.addDetector(tldLanguageDetector); // Add tldLanguageDetector

i18next
  .use(HttpBackend)
  .use(languageDetector)
  .use(initReactI18next)
  .init({
    detection: {
      order: ['cookie', 'tld'], // Add tld
      lookupCookie: 'lng',
      caches: ['cookie'],
    },
  });

export default i18next;

FAQs

Package last updated on 28 Apr 2021

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