/** * Sample React Native App * * adapted from App.js generated by the following command: * * react-native init example * * https://github.com/facebook/react-native */ import React, { Component } from 'react'; import { StyleSheet, Text, View, Image, Button } from 'react-native'; import { LocalizationProvider } from './LocalizationContext.js'; import translations, {DEFAULT_LANGUAGE} from './translations'; import Crowdin from '@crowdin/react-native-sdk'; export default class App extends Component<{}> { state = {}; updateLocalization() { Crowdin.initWithHashString('fcaf0dd82870a8dfbcc5f9876j9', DEFAULT_LANGUAGE, (message) => {}); Crowdin.getResourcesByLocale('uk', (data) => { var response = JSON.parse(data); translations.setContent( Object.assign({}, translations.getContent(), { uk: response.strings }) ); this.resetState(); }) } resetState = () => { this.setState({}); } render() { return ( {translations.app_title} {translations.app_description} {translations.book_name} {translations.book_description} {translations.categories} {translations.category_novel} {translations.category_adventures} {translations.category_science}