Skip to content

a React component for displaying interlinear right to left text online

Notifications You must be signed in to change notification settings

barakplasma/interlinear-text-lib

Repository files navigation

When you want to display interlinear text like so:

Image of Interlinear Text

Quickstart:

import InterlinearSentence from 'interlinear-text-lib';

<InterlinearSentence sentence={[{"en":"Hello","iw":"שלום"},{"en":"World!","iw":"עולם!"},{"en":"My name","iw":"שם שלי"},{"en":"is","iw":"הוא"},{"en":"Michael.","iw":"מיכאל."}]} />

English sentence: Hello World! My name is Michael.

Hebrew sentence: שלום עולם! שם שלי הוא מיכאל.

Live Demo available at https://stackblitz.com/edit/react-nyhskt

Here's how you use the component

<InterlinearSentence sentence={wordObjectArray} />

Here's an example of the JSON needed to build the sentence in the image:

[{"en":"Hello","iw":"שלום"},{"en":"World!","iw":"עולם!"},{"en":"My name","iw":"שם שלי"},{"en":"is","iw":"הוא"},{"en":"Michael.","iw":"מיכאל."}]

About

a React component for displaying interlinear right to left text online

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published