@remirror/i18n
TypeScript icon, indicating that this package has built-in type declarations

2.0.5 • Public • Published

@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' />;
};

Dependencies (5)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @remirror/i18n

    Weekly Downloads

    29,935

    Version

    2.0.5

    License

    MIT

    Unpacked Size

    89.4 kB

    Total Files

    20

    Last publish

    Collaborators

    • ocavue
    • ifiokjr