ra-language-galician
v1.0.1
Published
Galician messages for react-admin, the frontend framework for building admin applications on top of REST/GraphQL services
Downloads
3
Readme
RA Language Galician
Galician translations for React Admin
.
Install
You can install this library via NPM or YARN.
NPM
npm i ra-language-galician
YARN
yarn add ra-language-galician
Use case
You need to have galician translations in your React Admin
app.
Usage
The usage is really simple:
- Define your
i18nProvider
:
// i18nProvider.ts
import polyglotI18nProvider from "ra-i18n-polyglot";
import galicianMessages from "ra-language-galician";
const messages = {
gl: galicianMessages,
};
export const i18nProvider = polyglotI18nProvider((locale) => messages[locale]);
- Pass your custom
i18nProvider
to yourReact Admin
instance:
// App.tsx
import React from "react";
import { Admin, Resource } from "react-admin";
import jsonServerProvider from "ra-data-json-server";
export const App = () => {
const dataProvider = jsonServerProvider(
"https://jsonplaceholder.typicode.com"
);
return (
<Admin locale="gl" i18nProvider={i18nProvider} dataProvider={dataProvider}>
<Resource name="users" list={ListGuesser} />
</Admin>
);
};
App.displayName = "App";
Issues
Please, open an issue following one of the issues templates. We will do our best to fix them.
Contributing
If you want to contribute to this project see contributing for more information.
License
Distributed under the MIT license. See LICENSE for more information.