Skip to main content

React Native

Installation

npm install @crowdin/ota-client

Client initialization

import OtaClient from '@crowdin/ota-client';

const otaClient = new OtaClient('{distribution_hash}');

Integration with react-native-localization

import LocalizedStrings from 'react-native-localization';

//localizedStrings is an instance of translations which is used across whole application
async function build(localizedStrings: LocalizedStrings) {
const translations = await otaClient.getStrings();
localizedStrings.setContent(translations);
}

Further reading