JSPM

@remirror/i18n

0.0.0-pr706.11
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 14109
  • Score
    100M100P100Q146314F
  • License MIT

Supported internationalization and locales for the remirror editor.

Package Exports

  • @remirror/i18n
  • @remirror/i18n/en
  • @remirror/i18n/package.json
  • @remirror/i18n/plurals
  • @remirror/i18n/types/en/index
  • @remirror/i18n/types/en/messages
  • @remirror/i18n/types/index
  • @remirror/i18n/types/plurals

Readme

@remirror/i18n

Supported internationalization and locales for the remirror editor.

Version Weekly Downloads Bundled size Typed Codebase MIT License

Installation

# yarn
yarn add @remirror/i18n

# pnpm
pnpm add @remirror/i18n

# npm
npm install @remirror/i18n

Usage

The following code creates adds an en translation to your social editor.

import { en as enPlurals } from 'make-plural/plurals';
import React from 'react';
import { i18n } from '@remirror/i18n';
import en from '@remirror/i18n/en/messages';
import { SocialEditor } from '@remirror/react';

i18n.loadLocaleData('en', { plurals: anPlurals });

i18n.load({
  en: en.messages,
});

const Editor = () => {
  <SocialEditor i18n={i18n} locale='en' />;
};