Skip to main content

Storage

If your translations lives on the backend, you can pass optionally the Storage params in the TranslationsProvider:

src/index.tsx
import React from 'react';import ReactDOM from 'react-dom';import './index.css';import App from './App';import { TranslationsProvider } from 'react-text-localizer';import { translationsContext } from './l10n';
ReactDOM.render(  <React.StrictMode>    <TranslationsProvider      context={translationsContext}      language="gb"      storage={localStorage}    >      <App />    </TranslationsProvider>  </React.StrictMode>,  document.getElementById('root'));