This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@travpro/react-chat

1.7.11-beta.7 • Public • Published

setTexts

The chat package includes built-in i18n strings (currently only in English), if you wish to use a different language or simply a different string you can use the setTexts function.

This package exports a function setTexts which can be used to override the internal i18n strings. This is done by either passing the string of a different built-in language or by passing a language object.

Example

Set the chat to use the internal French translation.

import { setTexts } from '@travpro/react-chat';

setTexts('fr');

Set the chat to use the same language object as the app

import { setTexts } from '@travpro/react-chat';
import en from 'locales/en';

setTexts(en);

NOTE: Most apps call i18n.setTexts at their entrypoint, this is not the same function but setTexts should be called in the same place.

Readme

Keywords

none

Package Sidebar

Install

npm i @travpro/react-chat

Weekly Downloads

1

Version

1.7.11-beta.7

License

MIT

Unpacked Size

10.4 MB

Total Files

187

Last publish

Collaborators

  • imrevschaijk