JSPM

@wielgi/ra-language-polish

1.4.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 39
  • Score
    100M100P100Q82403F
  • License MIT

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

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@wielgi/ra-language-polish) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    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.