ra-language-hindi
v1.0.0
Published
Hindi messages for react-admin, the frontend framework for building admin applications on top of REST/GraphQL services
Downloads
492
Maintainers
Readme
Hindi Messages for React-Admin
Hindi messages for react-admin, the frontend framework for building admin applications on top of REST/GraphQL services.
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:
- 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';
- 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');
- Finally, pass this provider object as a prop to your
Admin
component:
<Admin i18nProvider={i18nProvider} ...>
...
</Admin>
- 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.