Hindi messages for react-admin, the frontend framework for building admin applications on top of REST/GraphQL services.
npm install --save ra-language-hindi
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.
ra-language-hindi
is licensed under MIT License.