The best way to deliver translations to your React Native application is to use Crowdin Over-The-Air Content Delivery.
Crowdin OTA delivers all-new translations from the Crowdin project to the application immediately. So there is no need to update this application to get the new version with the localization.
Information about Crowdin OTA can be found in the Knowledge Base article. Also, visit the Wiki to read more about the advanced usage of OTA Client.
npm install @crowdin/ota-client
# or
yarn add @crowdin/ota-client
import OtaClient from '@crowdin/ota-client';
const otaClient = new OtaClient('{distribution_hash}');
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);
}
A fully working example can be found here.
Crowdin Over-The-Air CDN feature is built with security in mind, which means minimal access possible from the end-user is required. When you decide to use Over-The-Air CDN, please make sure you’ve made the following information accessible to your end-users.
Crowdin is a platform that helps you manage and translate content into different languages. Integrate Crowdin with your repo, CMS, or other systems. Source content is always up to date for your translators, and translated content is returned automatically.
Learn MoreReleased on Apr 1, 2022
Updated on Jul 9, 2024
Published by Crowdin
Identifier:react-native-sdk