# react-g-lang

> Multi Language Module / 가장 편리한 다국어 모듈(자동완성 지원)

Latest version **1.0.2** (published 2019-09-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-g-lang
pnpm add react-g-lang
yarn add react-g-lang
bun add react-g-lang
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-09-10 |
| First published | 2019-07-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | JaeWan, Ryu |
| Maintainers | lendland |

## Links

- npm: https://www.npmjs.com/package/react-g-lang
- Repository: https://github.com/lingobong/react-g-lang
- Issues: https://github.com/lingobong/react-g-lang/issues
- npm.io page: https://npm.io/package/react-g-lang

## Dependencies (2)

- [react](https://npm.io/package/react.md) ^16.8.6
- [g-lang](https://npm.io/package/g-lang.md) 0.0.12

## Recent versions

- 1.0.2 (latest) — 2019-09-10
- 1.0.1 — 2019-08-07
- 1.0.0 — 2019-07-18
- 0.0.1 — 2019-07-16

## README

# install
```
npm install react-g-lang
```

# react or react-native example
```js
import React from 'react';
import { SafeAreaView, Text,TouchableOpacity } from 'react-native';

// required
import { setLanguages, setLanguage, createObject } from 'g-lang'
import LangReloader, { lang } from 'react-g-lang'


// './languages' must be the same path as './node_modules'
// Please download 'https://github.com/lendland/g-lang/raw/master/g-lang-example.zip' and refer to directory/file structure.
setLanguages({
    en: require('./languages/en'),
    kor: require('./languages/default'),
})

const langObject = createObject(function (){
    return {
        content: lang.content
    }
})

class App extends React.Component {
    render(){
        return (
            <SafeAreaView style={{ flex: 1 }}>

            <TouchableOpacity style={{ padding:20 }} onPress={()=>{
            setLanguage('en')
            }}>
            <Text>to EN</Text>
            </TouchableOpacity>
            <TouchableOpacity style={{ padding:20 }} onPress={()=>{
            setLanguage('kor')
            }}>
            <Text>to KOR</Text>
            </TouchableOpacity>

            <Text>{lang.title}</Text>
            <Text>{langObject.content}</Text>
            </SafeAreaView>
        )
    }
};

// Be sure to wrap your app with LangReloader.
export default LangReloader(App);
```

# DOC
[https://github.com/lendland/g-lang](https://github.com/lendland/g-lang)

---
_Source: https://npm.io/package/react-g-lang · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
