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: 2 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 7 years ago)
- Default Branch: master
- Last Pushed: 2025-04-04T20:57:49.000Z (about 1 year ago)
- Last Synced: 2025-07-02T12:07:18.085Z (10 months ago)
- Topics: scripture-open-components
- Language: JavaScript
- Homepage: https://markdown-translatable.netlify.app/
- Size: 1.52 MB
- Stars: 0
- Watchers: 2
- 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/