Skip to main content

React Native set up

  • In your App.(js|tsx) file, import your JSON translations
  • Wrap your App with Talkr's Provider
  • Pass it your available languages and your defaultLanguage.
import { StyleSheet, Text, View } from "react-native";
import { Talkr } from "talkr";
import en from "./src/i18n/en.json";
import fr from "./src/i18n/fr.json";
import MyComponent from "./src/MyComponent";

export default function App() {
return (
<Talkr languages={{ en, fr }} defaultLanguage="en">
<View style={styles.container}>
<MyComponent />
</View>
</Talkr>
);
}