1.0.0 • Published 3 years ago

ra-language-hindi v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

Hindi Messages for React-Admin

Hindi messages for react-admin, the frontend framework for building admin applications on top of REST/GraphQL services.

react-admin-demo

Installation

npm install --save ra-language-hindi

Basic Usage

To use Hindi Translations in your react-admin application, the quickest way is to use the officially supported polygot i18 library that is shipped with react-admin:

  1. Import the necessary packages in your App.js:
import polyglotI18nProvider from 'ra-i18n-polyglot';
import hindiMessages from 'ra-language-hindi';
import englishMessages from 'ra-language-english';
  1. Create a new instance of polygot with the desired language:
// For any existing language (english, for the sake of this example)
const i18nProvider = polyglotI18nProvider(() => englishMessages, 'en');

// For using hindi translations
const i18nProvider = polyglotI18nProvider(() => hindiMessages, 'hi');
  1. Finally, pass this provider object as a prop to your Admin component:
<Admin i18nProvider={i18nProvider} ...>
...
</Admin>
  1. For more documentation on using translations in react-admin, you can refer to the official docs.

License

ra-language-hindi is licensed under MIT License.