gt-react-native 0.0.18-alpha.0 → 10.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://generaltranslation.com/docs/react-native">
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://generaltranslation.com/brand/gt-logo-dark.svg">
|
|
5
|
+
<img alt="General Translation" src="https://generaltranslation.com/brand/gt-logo-light.svg" width="100" height="100">
|
|
6
|
+
</picture>
|
|
7
|
+
</a>
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
<p align="center">
|
|
11
|
+
<a href="https://generaltranslation.com/docs/react-native"><strong>Documentation</strong></a> · <a href="https://github.com/generaltranslation/gt/issues">Report Bug</a>
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
# gt-react-native
|
|
15
|
+
|
|
16
|
+
Automatic i18n for React Native.
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install gt-react-native
|
|
22
|
+
npm install gt --save-dev
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Quick Start
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx gt init
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```jsx
|
|
32
|
+
import { T, GTProvider } from 'gt-react-native';
|
|
33
|
+
import gtConfig from '../gt.config.json';
|
|
34
|
+
import { loadTranslations } from './loadTranslations';
|
|
35
|
+
|
|
36
|
+
export default function App() {
|
|
37
|
+
return (
|
|
38
|
+
<GTProvider config={gtConfig} loadTranslations={loadTranslations}>
|
|
39
|
+
<T>
|
|
40
|
+
<Text>This gets translated automatically.</Text>
|
|
41
|
+
</T>
|
|
42
|
+
</GTProvider>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
See the [full documentation](https://generaltranslation.com/docs/react-native) for guides and API reference.
|