Socket
Socket
Sign inDemoInstall

ra-auth-cognito-language-english

Package Overview
Dependencies
228
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ra-auth-cognito-language-english

English translations for [ra-auth-cognito](https://www.npmjs.com/package/ra-auth-cognito).


Version published
Weekly downloads
39
decreased by-79.47%
Maintainers
1
Install size
6.35 kB
Created
Weekly downloads
 

Readme

Source

ra-auth-cognito-language-english

English translations for ra-auth-cognito.

Installation

npm install ra-auth-cognito-language-english
# or
yarn add ra-auth-cognito-language-english

Usage

// in i18nProvider.js
import { raAuthCognitoEnglishMessages } from 'ra-auth-cognito-language-english';
import { mergeTranslations } from 'react-admin';
import polyglotI18nProvider from 'ra-i18n-polyglot';
import englishMessages from 'ra-language-english';

const allEnglishMessages = mergeTranslations(
    englishMessages,
    raAuthCognitoEnglishMessages
);

export const i18nProvider = polyglotI18nProvider(
    locale => allEnglishMessages,
    'en'
);

// in App.js
import { Admin, Resource, ListGuesser } from 'react-admin';
import { authRoutes } from 'ra-auth-cognito';
import { dataProvider } from './dataProvider';
import { authProvider } from './authProvider';
import { i18nProvider } from './i18nProvider';

export const MyAdmin = () => (
    <Admin
        dataProvider={dataProvider}
        authProvider={authProvider}
        i18nProvider={i18nProvider}
        customRoutes={authRoutes}
    >
        <Resource name="posts" list={ListGuesser} />
        <Resource name="authors" list={ListGuesser} />
    </Admin>
);

FAQs

Last updated on 19 Feb 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc