https://github.com/unfoldingword/markdown-translatable
A Collection of Components for Translating Markdown Files.
https://github.com/unfoldingword/markdown-translatable
scripture-open-components
Last synced: 3 months ago
JSON representation
A Collection of Components for Translating Markdown Files.
- Host: GitHub
- URL: https://github.com/unfoldingword/markdown-translatable
- Owner: unfoldingWord
- License: other
- Created: 2019-04-04T00:16:07.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-08T14:58:05.000Z (about 2 years ago)
- Last Synced: 2025-02-08T04:19:44.716Z (4 months ago)
- Topics: scripture-open-components
- Language: JavaScript
- Homepage: https://markdown-translatable.netlify.com/
- Size: 1.52 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
```js
import {
DocumentTranslatable,
BlockEditable,
} from "markdown-translatable";
```Use in your component for editing Markdown:
```jsx
const markdown = "**Hello** __world__";
const _translation = "**नमस्ते** __दुनिया__";initialState = {
translation: _translation,
};setState({translation})
}
/>
```Use in your component for translating a Markdown file:
```jsx
const markdown = "**Hello** __world__";
const _translation = "**नमस्ते** __दुनिया__";initialState = {
translation: _translation,
};setState({ translation })
}
/>
```See the Style Guide for more examples:
https://unfoldingword-box3.github.io/markdown-translatable/