Giter Site home page Giter Site logo

ra-language-polish's Introduction

Polish Messages for React-Admin

Build

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

Installation

npm install ra-language-polish
yarn add ra-language-polish

Usage

As per react-admin documentation

Setting Up Translations

If you want to add or update translations, you'll have to provide your own i18nProvider.

Just like for the dataProvider and the authProvider, you can inject the i18nProvider to your react-admin app using the <Admin i18nProvider> prop:

import { i18nProvider } from './i18nProvider';

const App = () => (
    <Admin 
        dataProvider={dataProvider}
        i18nProvider={i18nProvider}
    >
        {/* ... */}
    </Admin>
);

In most cases, the i18nProvider will contain translations for both react-admin keys and your own keys.

Changing The Default Locale

If you want to display the interface in another language than English by default, you have to set up an i18nProvider that provides the translation for all the keys used by react-admin. Fortunately, the react-admin community has already written translations for more than 40 locales. Check the list of available locales to find the locale you're looking for.

For instance, to change the interface to Polish, install the ra-language-polish npm package, then use it in a custom i18nProvider, as follows:

// in src/i18nProvider.js
import polyglotI18nProvider from 'ra-i18n-polyglot';
import pl from 'ra-language-polish';

export const i18nProvider = polyglotI18nProvider(() => pl, 'pl');

Tip: The ra-i18n-polyglot package allows to build an i18nProvider based on translation messages. It relies on the Polyglot.js library.

License

This translation is licensed under the MIT License.

ra-language-polish's People

Contributors

tymek avatar tskorupka avatar renovate-bot avatar dependabot[bot] avatar ashylen avatar tysian avatar kotkarol avatar karolzlot avatar

Stargazers

Roman avatar  avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

ra-language-polish's Issues

Continuous support

I made some improvements

  • Typescript support
  • Renovate Bot for updating dependencies
  • Travis CI build with weekly cron
  • fixed missing strings
  • removed not working image from README
  • other minor changes

would you be interested in merging it?
BTW, is this translation still sponsored and supported, as README states?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.