New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

tl8-react

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tl8-react

Check out [tl8.io](https://tl8.io) to learn about TL8 and the open-source repository on Github [https://github.com/kevinmerckx/tl8](https://github.com/kevinmerckx/tl8).

latest
Source
npmnpm
Version
0.0.1-beta.4
Version published
Weekly downloads
4
300%
Maintainers
1
Weekly downloads
 
Created
Source

tl8-react

Check out tl8.io to learn about TL8 and the open-source repository on Github https://github.com/kevinmerckx/tl8.

This library is the React counter-part of the TL8 solution.

Install

npm install tl8-react

Use

Prepare translation files

Prepare translation files such as en.json:

{
  "some": {
    "textToTranslate": "Here we go",
    "other": "Yes!"
  }
}

Prepare your application

import { TL8Provider } from 'tl8-react';
import en from './en.json';
import fr from './fr.json';

const tl8Config = {
  currentLang: 'en',
  translations: {
    en,
    fr,
  },
};

function App() {
  return <TL8Provider config={tl8Config}>
    <Tl8 of="some.textToTranslate" />
    <Tl8 of="some.other" />
  </TL8Provider>;
}

Get current language and change language

const { setCurrentLanguage, currentLanguage } = useTL8();

FAQs

Package last updated on 29 Mar 2024

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