Socket
Book a DemoInstallSign in
Socket

react-jed

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-jed

React component for Jed

latest
npmnpm
Version
0.1.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

React Jed

React component for translation with Jed.

Installation

$ npm install --save react-jed

Usage

Simple translation

import Trans from 'react-jed'

class MyComponent extend React.Component {
    render() {
        var translations = window.translations
        return (
            <Trans trans={translations}>Christian Bale has an apple</Trans>
        )
    }
}

Complex translation with plural

import Trans from 'react-jed'

class MyComponent extend React.Component {
    render() {
        var nbr = 1,
            translations = window.translations

        return (
            <Trans
                count={nbr}
                one="{username} has one apple"
                plural="{username} has {nbr} apples"
                none="{username} has no apples"
                trans={translations}
            />
        )
    }
}

FAQs

Package last updated on 20 Apr 2015

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