markdown-translatable

2.1.4 • Public • Published

A Collection of Components for Translating Markdown Files.

Install using npm or yarn: npm install markdown-translatable yarn add markdown-translatable

Import the relevant components to the top of your React file:

import {
  DocumentTranslatable,
  BlockEditable,
} from "markdown-translatable";

Use in your component for editing Markdown:

const markdown = "**Hello** __world__";
const _translation = "**नमस्ते** __दुनिया__";

initialState = {
  translation: _translation,
};

<SectionTranslatable
  original={markdown}
  translation={state.translation}
  onTranslation={(translation) =>
    setState({translation})
  }
/>

Use in your component for translating a Markdown file:

const markdown = "**Hello** __world__";
const _translation = "**नमस्ते** __दुनिया__";

initialState = {
  translation: _translation,
};

<DocumentTranslatable
  original={markdown}
  translation={state.translation}
  onTranslation={(translation) =>
    setState({ translation })
  }
/>

See the Style Guide for more examples: https://unfoldingword-box3.github.io/markdown-translatable/

Dependencies (8)

Dev Dependencies (32)

Package Sidebar

Install

npm i markdown-translatable

Weekly Downloads

111

Version

2.1.4

License

MIT

Unpacked Size

209 kB

Total Files

39

Last publish

Collaborators

  • joelcjohnson94
  • abelpz
  • kintsoogii
  • larsgson
  • jakobaleksandrovich
  • neutrinog
  • klappy
  • macolon
  • photo-nomad
  • richmahn
  • bspidel
  • mandolyte
  • jag3773
  • mvahowe